abdelrahman.elbarbary
BAN USER
public class Program
{
public static void Main(string[] args)
{
var dict = new Dictionary<string, int>();
dict.Add("a", 1);
dict.Add("aa", 1);
dict.Add("aaa", 1);
var input = "aaabaa";
get_combinations(input, dict);
}
public static void get_combinations(string input, Dictionary<string, int> dict)
{
for (int i = 0; i < input.Length; i++)
{
for (int j = i ; j < input.Length ; j++)
{
if (dict.ContainsKey(input.Substring(i, j-i+1)))
{
Console.WriteLine(input.Substring(i, j-i+1));
}
}
}
}
}
import copy
def get_sets_of_sum(numbers, k, possible_set, result):
if k == 0:
if sorted(possible_set) not in result :
result.append( sorted(possible_set))
elif k < 0:
return
else:
for n in numbers:
new_set = copy.copy(possible_set)
new_set.append(n)
new_numbers = copy.copy(numbers)
new_numbers.remove(n)
get_sets_of_sum(new_numbers, k-n, new_set, result)
k = 10
possible_set = []
numbers = list(range(1,10))
result = []
get_sets_of_sum(numbers, k, possible_set, result)
for r in result:
print(r)
Repmarkhmitchell6, Analyst at ASAPInfosystemsPvtLtd
At first, tattooing was a hobby kind of thing for me. I didn’t spend too much time in tattoo ...
Repmarkhlee8, Research Scientist at Bank of America
I am a cooking Instructor in New York USA, I Have a degree from the prestigious Culinary Arts Institute of ...
Repsusancmeans, Apple Phone Number available 24/7 for our Customers at Absolute Softech Ltd
I am Susan from Bronx, I am working as a Business management analyst in Brendle's company. I Have a ...
Repfredlhenry, Android Engineer at Digital Merkating
Hi, I am Fred, 27 years old, I have done bachelor’s in IT.I have been working for a ...
Repshanamkyler38, AT&T Customer service email at ABC TECH SUPPORT
Hi, I am Shana and I live in Chicago USA .I am working as a Tax preparer in an Adaptabiz ...
Repverarfurman, Problem Setter at Cerberus Capital
I am Vera from Bullard USA, I am working as a Violin repairer in a Handyman company. My interest in ...
Repharrylseay, Aghori Mahakal Tantrik at ASAPInfosystemsPvtLtd
I am Harry and I live in the USA but basically I am from Bangor. I live my life very ...
Repjuanktait, Blockchain Developer at ADP
I am Juan from Seattle, WA. I am working as a LAN administrator. I love music, reading historical books, and ...
Reppaulinedsisk, Testing / Quality Assurance at Cloudmere, Inc.
I want to become a successful professional in a highly competitive technological world where performance is rewarded with exciting new ...
Repkevinlmoses, Animator at Accenture
I am Experienced Building Manager who is an expert in public and industrial safety with a preventative mindset against fire ...
Repadak4257, Applications Developer at Adobe
I am fond of Listening Songs then reading newspapers which are all about a story of a beautiful nature and ...
Reppaulaamontalvo, AT&T Customer service email at AMD
I am working as Human Resources Associates, and my duties are for obtaining, recording, and interpreting human resources information within ...
Repjohnagragg0, cox customer service at Deloitte Consulting LLP
I am friendly, I am a hard worker, even through difficult circumstances, I want to know about How to identify ...
Repmitadwilson, Scientific Officer at Cleartrip.com
Hello, I am Mita from Dayton, I am working as a Systems programmer in Evans company, I have Experience of ...
Rephollymclark8, Apple Phone Number available 24/7 for our Customers at Accenture
I am clinical laboratory technologist in Stratapro company. I have Excellent clinical laboratory skills, with commended performance conducting/analyzing laboratory ...
Rephoychrista, Blockchain Developer at ASU
Worked with Clients to guide them through the event details about copier leasing companies and served as their personal coordinator ...
Repelisahbuff, Apple Phone Number available 24/7 for our Customers at Altera
I have previous work experience in a customer focused environment. I like to Enjoy my Free Time Playing football.I ...
Repkarinkwalton, Backend Developer at Broadsoft
I am working as a Support clerk in an MVP Sports company. I love traveling and exploring facts about technology ...
Open Chat in New Window
- abdelrahman.elbarbary January 03, 2018