@dave : could you provide pseudo code for ur approach
On 6 Jan 2014 07:39, Dave dave_and_da...@juno.com wrote:
Use a binary search. Assume that you have arrays a[m] and b[n] sorted in
ascending order. If a[i] is the kth smallest element, then b[k-i-2] must be
smaller than a[i], and b[k-i-1]
BTW, job perks are
- Top of the line MacBook Pro
- 24” monitor
- Smartphone of your choice
- Working with a team of passionate people just like you who love to
build products
- Significant early stage stock options
--
@abhinav http://www.twitter.com/abhinav | abhinav.co
On
generate all possible DISTINCT permutations of a given string with some
possible repeated characters. Use as minimal memory as possible.
if given string contains n characters in total with m n distinct
characters each occuring n_1, n_2, n_m times where n_1 + n_2 + ...+ n_m
= n
program
generate all possible DISTINCT permutations of a given string with some
possible repeated characters. Use as minimal memory as possible.
if given string contains n characters in total with m n distinct
characters each occuring n_1, n_2, n_m times where n_1 + n_2 + ...+ n_m
= n
program
generate all possible DISTINCT permutations of a given string with some
possible repeated characters. Use as minimal memory as possible. Time
complexity should be as close as possible to actual number of permutations.
For example if aa (10 a's) is given as input we should not be
checking