Re: [algogeeks] Re: Amazon interview Question

2012-12-27 Thread Hariraman R
Can anyone give me some idea if the given no is small like 12 then the next
one is 17


On Mon, Dec 24, 2012 at 7:56 PM, marti amritsa...@gmail.com wrote:


 I REPEAT, THERE is no need to SORT;


 http://en.wikipedia.org/wiki/Permutation#Lexicographical%5Forder%5Fgeneration


 On Friday, December 14, 2012 11:56:16 AM UTC+5:30, tapan rathi wrote:

 For a given number, find the next greatest number which is just greater
 than previous one and made up of same digits.

  --




-- 




Re: [algogeeks]

2012-08-22 Thread Hariraman R
 @wladimar,

the value of 2 power 31 is 2147483648... but the integer range is
-2147483648 to 2147483647... when you trying to print the 2 power 31 it
gives you the value -2147483648 due to exceeding th limit of an signed int..

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] MICROSOFT QUESTION

2012-08-16 Thread Hariraman R
Hi,

   This is a microsoft question asked in our campus previous year.
Anyone having idea please share it here...

   Given an array of n elements A[n]. Write a program to create a
new array OUT[n],
which has its elements as multiplication of all the elements
in the input array A[n] except that element (i.e.) OUT[2] = A[0] *
A[1] * A[3] * ? * A[n-1].
 Constraint is one should not use division operator.

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: coin problem

2012-08-01 Thread Hariraman R
 @vipin kumar,

The no 7 and x are just assumptions it may be of any
combinations... just try it in real time then you will have a clear
understanding.

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] coin problem

2012-07-31 Thread Hariraman R
 You just split the 20 coins into two groups such that each one contains 10
coins. Now you have to flip any one group of coins so that you will get
same no. of heads and tails in each group.

For example,consider the 1st group contains 7 heads and 3 tails so
obviously the 2nd one contains 7 tails and 3 heads. if you flip the 2nd
group coins means you will get 7 heads and 3 tails so each group contains
same no. of heads and tails.

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Queue problem

2012-07-27 Thread Hariraman R
 Single queue only satisfies the given condition. I think it's the correct
one..

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Queue problem

2012-07-24 Thread Hariraman R
Which of the following queue creates overflow when the no of elements is
less than the queue size??

1)single queue
2)priority queue
3)dequeue
4)circular queue

Kindly explain what is the answer and why??? Thanks in advance..

-- 
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Queue problem

2012-07-24 Thread Hariraman R
 @mind blogger,

Thank u:) Got 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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.