[algogeeks] Re: Algoritm needed

2007-03-28 Thread Dont Know
Is it not Travelling Sales Person problem ??? I think we do the same for Travelling Sales Person algorithm also... On Mar 28, 6:55 pm, Guillermo Garcia [EMAIL PROTECTED] wrote: to better understand, can you send an small example with a solution? On 3/28/07, vinay [EMAIL PROTECTED] wrote:

[algogeeks] Re: Try this ..

2006-08-17 Thread Dont Know
@girish, I think U didnt understand the problem correctly... it is not the problem of finding the missing number. A missing number is replaced by some other number which is already existing in the list. --~--~-~--~~~---~--~~ You received this message

[algogeeks] Re: Try this ..

2006-08-17 Thread Dont Know
I will try to give one solution for this vaguely... Correct me if Im wrong. But, the solution suffers overflow problem if implemented. Assume that the number which got replaced is x and the number which replaced it is y obtain the sum of all the numbers, say Sum so, Sum - y + x = n(n+1) / 2

[algogeeks] Adaptive Algorithm

2006-08-17 Thread Dont Know
Hi, Please help me in knowing about Adaptive Algorithms What is an adaptive algorithm ? What are the areas in which these adaptive algorithms can be used ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[algogeeks] Re: Given a file (can be a huge file) ....

2006-08-09 Thread Dont Know
The solution I know, needs O(n) space. Take a circular queue of size n. Read a line at a time from the file and insert it into the queue. If the queue is full remove the first line and insert the newly read line. Repeat this process untill EOF is encountered. When we reach end of the file the

[algogeeks] Re: largest Number Smaller Than Given Number

2006-02-27 Thread Dont Know
@Juvexp Thats the perfect solution (I think). I missed the sorting part when I worked 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] largest Number Smaller Than Given Number

2006-02-26 Thread Dont Know
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

[algogeeks] Re: largest Number Smaller Than Given Number

2006-02-26 Thread Dont Know
@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

[algogeeks] Re: largest Number Smaller Than Given Number

2006-02-26 Thread Dont Know
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