Re: [algogeeks] Repeated values

2012-10-30 Thread arumuga abinesh
if sum of all elements = n(n-1)/2 , no elements are repeated
else some numbers are repeated

On Tue, Oct 30, 2012 at 11:57 PM, Don dondod...@gmail.com wrote:

 Given an array of N integers in the range 0..N-1, determine if any
 number is repeated in the array.
 Solution should execute in O(n) time and use constant space.
 Don

 --
 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.



-- 
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] Directi Interview Ques

2012-07-10 Thread arumuga abinesh
http://www.geeksforgeeks.org/archives/17743

Using the above problem we get all possible merges , at each possible
merge, we can calculate the sum.

On 7/11/12, Mr.B sravanreddy...@gmail.com wrote:
 I think you missed the question:
 Its a stable merge. (order of elements in each array should be same)
 Sorting will destroy the original order.

 Thanks,
 Mr.B
 [Please include complexities and pseudo-code]

 On Tuesday, 10 July 2012 16:18:04 UTC-4, Akshat wrote:

 Here you have to first sort both the arrays A and B and merge both the
 arrays to form the sorted array C

 --


 Akshat Sapra
 Under Graduation(B.Tech)
 IIIT-Allahabad(Amethi Campus)
 *--*
 sapraaks...@gmail.com
 akshatsapr...@gmail.com
 rit20009008@ rit20009...@gmail.comiiita.ac.in


 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/uCRLEzDBWAAJ.
 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.



-- 
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.