Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: November 26, 2024, 5:45 pm

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bruteforce
#5
RE: Bruteforce
(August 2, 2015 at 9:18 am)Aractus Wrote: I would use a container method. For word size n, for example where n=4:

ABCD

n1(n2(n3(n4))) ... n1(n4( ... )) ... n2 ... n4

I'm sorry,i'm not familiar with the concept of a container method.Anyhow i'd be much appreciative if you could provide me with a pseudo code or an algorithm.

(August 2, 2015 at 9:21 am)vorlon13 Wrote: Found this, if you change the 'digit map' it will do what you want apparently. (I'm not familiar with 'Python', BTW)

digit_map = {
   '2': 'abc',
   '3': 'def',
   '4': 'ghi',
   '5': 'jkl',
   '6': 'mno',
   '7': 'pqrs',
   '8': 'tuv',
   '9': 'wxyz',
}

def word_numbers(input):
 input = str(input)
 ret = ['']
 for char in input:
   letters = digit_map.get(char, '')
   ret = [prefix+letter for prefix in ret for letter in letters]
 return ret

Thanks,but god that looks ugly,i can't make sense of the code probably because i'm not familiar with that language,i don't really want the code,i just want the algorithm or pseudo code.

P.S. I'm using c,not that it helps,just saying.
Reply



Messages In This Thread
Bruteforce - by ErGingerbreadMandude - August 2, 2015 at 7:54 am
RE: Bruteforce - by vorlon13 - August 2, 2015 at 9:09 am
RE: Bruteforce - by Aractus - August 2, 2015 at 9:18 am
RE: Bruteforce - by vorlon13 - August 2, 2015 at 9:21 am
RE: Bruteforce - by ErGingerbreadMandude - August 2, 2015 at 9:33 am
RE: Bruteforce - by Alex K - August 2, 2015 at 9:47 am
RE: Bruteforce - by Aoi Magi - August 2, 2015 at 10:15 am
RE: Bruteforce - by ErGingerbreadMandude - August 2, 2015 at 10:48 am
RE: Bruteforce - by LastPoet - August 2, 2015 at 10:55 am
RE: Bruteforce - by ErGingerbreadMandude - August 2, 2015 at 11:16 am
RE: Bruteforce - by LastPoet - August 2, 2015 at 2:56 pm
RE: Bruteforce - by ErGingerbreadMandude - August 2, 2015 at 3:15 pm
RE: Bruteforce - by Ravenshire - August 2, 2015 at 3:17 pm
RE: Bruteforce - by LastPoet - August 2, 2015 at 3:25 pm
RE: Bruteforce - by emjay - August 2, 2015 at 3:44 pm
RE: Bruteforce - by Alex K - August 2, 2015 at 4:59 pm
RE: Bruteforce - by ErGingerbreadMandude - August 2, 2015 at 3:41 pm
RE: Bruteforce - by bennyboy - August 9, 2015 at 8:59 am



Users browsing this thread: 1 Guest(s)