Thanks Ajay...
I got some Idea.
I will work on it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this g
@dhyanesh have u written some pseudo-code function fo the problem as actually i could only c prev_permutation. Can u make it more clear.On 2/26/06, Dhyanesh
<[EMAIL PROTECTED]> wrote:
This should work prev_permutation ( )-DhyaneshOn 2/26/06, Dont Know <
[EMAIL PROTECTED]
> wrote:@daizi sheng
This should work prev_permutation ( )-DhyaneshOn 2/26/06, Dont Know <[EMAIL PROTECTED]
> wrote:@daizi sheng Thanks for Ur ideas. But in Ur solution how do u fix the prefix.
ie., How did U choose 112 as the prefix in the number 11261. Canu pls provide the algo.@Ajay U are correct. for th
I think the simple algo can be1) start from the rightmost number,2) take the last 2 numbers ( rightmost-units place and rightmost -1- tens place ).3) if they form a non increasing sequence and also !equal( 10 splace number > units place ) , swap them , thats the answer,
4) else take 3 numbers from
We know that using divide-and-conquer, one can compute the product of
two n digit integers in less than n^2 time. Can anyone come up with a
better algorithm that can divide the two numbers in three equal pieces
each and use only 5 multiplications to compute the product?
--~--~-~--~~
Get The Book "501 Website Secrets" For Free
Join My Group http://groups.yahoo.com/group/forsoftwareprofessionals/
To Receive The Book "501 Website Secrets" Free
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algor
Ah! A nice application of greedy approach. Thanks Gene.On 2/25/06, Gene <[EMAIL PROTECTED]> wrote:
Wow. Your solution is way too hard.Define function M(T) to be the minimum number of rounds needed to
notify all the subordinates of T after T herself is notified. If T hasno subordinates, then M(T)
Hi,
I want algo/prog for generating permutations for given multi-set,
without repetitions
Thanx in adv.
Bye
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this gr
@daizi sheng
Thanks for Ur ideas. But in Ur solution how do u fix the prefix.
ie., How did U choose 112 as the prefix in the number 11261. Can
u pls provide the algo.
@Ajay
U are correct. for the first example I gave, I made a mistake.
So, I will define the problem again. Sorry f
@daizi shengI was talking abt the examples present in the intiative problem. Wll i understand your approach , also thr are cases when their is no answer for eg. an increasing sequence of digit- 1234 . 3456, no answer such cases.
--~--~-~--~~~---~--~~
You received
2006/2/26, ajay mishra <[EMAIL PROTECTED]>:
> @Dont Know,
> plz check the examples which u gave
> 1) 321 should aswer be 231 or 312
e.g. 321
keep 3 not been changed, so change 21 only
2 could be descrease to 1
so the answer is 312
> 2) 5342 should the answer be 5432( it si greater than 5342) so i
@Dont Know,plz check the examples which u gave1) 321 should aswer be 231 or 3122) 5342 should the answer be 5432( it si greater than 5342) so it shld be 5324.plz check what i say , am i correct.
On 2/26/06, daizi sheng <[EMAIL PROTECTED]> wrote:
give u some ideas:for 112611st try: keep prefix 112 w
give u some ideas:
for 11261
1st try: keep prefix 112 without beening changed
the remaining number is 61
can we descrease the first digit (it is 6) ?
yes
so decrease it to the largest possible digit (that is 1)
so change 61 -> 16
so the answer is 11216
if we fail in the 1st try, we
Sorry Sorry in the above given examples in the third example the output
should be 11216.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@google
How to find the largest number smaller than the given number
with the same combination of digits in the given number.
eg.,
if the given number is 321
the algorithm should give 231
if the input is 5342
the output should be 5432.
if theinput is 11261
the output shoul
15 matches
Mail list logo