Re: [algogeeks] Win Shuttle

2011-08-15 Thread Simran Singh
They said 6.5lpa in hand.. N first round had basic C questions from test your C skills.. 2nd round ques was this - You have to code a function with 2 const strings as parameters.. And tell if one string is the rotated form of the other or not.. You have to do it with O(1) space complexity.. The

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
@Simran : what was CTC @ ur Campus ? Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India On Mon, Aug 15, 2011 at 1:23 PM, Simran Singh sammy.4...@gmail.com wrote: They said 6.5lpa in hand.. N first

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
@Simran : u got selected in winshuttle ? Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Simran Singh
CTC was 7 lpa.. Na.. I didnt make it past the 2nd round.. On Tue, Aug 16, 2011 at 1:57 AM, Sanjay Rajpal sanjay.raj...@live.inwrote: @Simran : u got selected in winshuttle ? Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
@Simran : Thanx :) waise how many got selected ? Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Simran Singh
2.. On Tue, Aug 16, 2011 at 2:03 AM, Sanjay Rajpal sanjay.raj...@live.inwrote: @Simran : Thanx :) waise how many got selected ? Sanjay Kumar B.Tech Final Year Department of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana,

Re: [algogeeks] Re: How to solve this problem

2011-08-15 Thread Ankur Garg
@Dave Dude can u provide a sample code...What do u mean by radix n ..also radix sort requires some other sorting algo to sort digits Regards Ankur On Sun, Aug 14, 2011 at 1:33 PM, Dave dave_and_da...@juno.com wrote: @Ankur: Use a radix sort with radix n. It will take 3 passes to sort the 3

Re: [algogeeks] program puzzle

2011-08-15 Thread Anil Arya
First reverse the senetence word by word and then reverse the whole stringthat will be easier On Mon, Aug 15, 2011 at 4:48 PM, programming love love.for.programm...@gmail.com wrote: write a program to reverse the words in a give string. also state the time complexity of the algo. if

Re: [algogeeks] program puzzle

2011-08-15 Thread Anil Arya
http://geeksforgeeks.org/?p=7150 that will clear you very well.i'm sure... On Mon, Aug 15, 2011 at 4:48 PM, programming love love.for.programm...@gmail.com wrote: write a program to reverse the words in a give string. also state the time complexity of the algo. if the string is i am a

[algogeeks] find numbers whose difference is min

2011-08-15 Thread Brijesh Upadhyay
Algorithm to find the two numbers whose difference is minimum among the set of numbers. For example the sequence is 5, 13, 7, 0, 10, 20, 1, 15, 4, 19 The algorithm should return min diff = 20-19 = 1. Constraint - Time Complexity O(N) -- You received this message because you are subscribed to

Re: [algogeeks] find numbers whose difference is min

2011-08-15 Thread sukran dhawan
find the minimum of two numbers in a loop o(n) and subtract the two On Tue, Aug 16, 2011 at 6:13 AM, Brijesh Upadhyay brijeshupadhyay...@gmail.com wrote: Algorithm to find the two numbers whose difference is minimum among the set of numbers. For example the sequence is 5, 13, 7, 0, 10, 20, 1,

Re: [algogeeks] find numbers whose difference is min

2011-08-15 Thread Shuaib
That won't work. And I don't think an O(n) solution is possible. -- Shuaib http://twitter.com/ShuaibKhan http://www.bytehood.com/ On 16-Aug-2011, at 6:25 AM, sukran dhawan sukrandha...@gmail.com wrote: find the minimum of two numbers in a loop o(n) and subtract the two On Tue, Aug 16, 2011

Re: [algogeeks] Re: How to solve this problem

2011-08-15 Thread *$*
lets assume numbers are in range 0 - 4 ,and array is aarr . then range would be 0- 4^3 .. (0 - 64).. now allocate an arraay .. int *x = calloc(n^3,sizeof(int)) // can use even bits aalso .. but for simplicity of algo , using array for(int i=0;i4;i++) { x[arr[i]] = 1; } for(int i=0;i64;i++) {

[algogeeks] How to print Combination triangle??

2011-08-15 Thread Beginner
1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 -- 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

[algogeeks] EMC Software

2011-08-15 Thread dexter does
can anyone post EMC software sample questions and its pattern ASAP?? -- 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

Re: [algogeeks] How to print Combination triangle??

2011-08-15 Thread Sanjay Rajpal
See carefully it is a binomial triangle and u r missing 11 as second term. Well each term after second (except 1s) term (i,j), is equal to the sum of the term term(i-1 , j) +term(i-1 , j-1). I think this is enough for you to write the code. Hope it helps and lemme know you solved it or not.

[algogeeks] sumitabha das unix ebook ?

2011-08-15 Thread MAC
does anyone has sumitabha das unix ebook for unix ? -- thanks --mac -- 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

Re: [algogeeks] MS question

2011-08-15 Thread sagar pareek
Well sambyal i just know that neither trie nor link list is the answer may be you have to make ur own data structure using *array of structure *having elements like long carry, long long number and all.. i m not sure On Mon, Aug 15, 2011 at 11:21 AM, siddharam suresh

Re: [algogeeks] Assignment!!

2011-08-15 Thread sagar pareek
http://en.wikipedia.org/wiki/Comma_operator On Mon, Aug 15, 2011 at 11:24 AM, shady sinv...@gmail.com wrote: read abt assignments and statements in C On Mon, Aug 15, 2011 at 11:14 AM, muthu raj muthura...@gmail.com wrote: What is the difference between the following statements. int

Re: [algogeeks] MS question

2011-08-15 Thread siddharam suresh
@sagar pareek: how do you allocated space for that number using array at run time(by considering size of/number of bits to represent the number is unknown )? Thank you, Siddharam On Tue, Aug 16, 2011 at 10:03 AM, sagar pareek sagarpar...@gmail.com wrote: Well sambyal i just know that neither

Re: [algogeeks] matrix question ???!!!!!!!!!!??????????

2011-08-15 Thread sagar pareek
Hey guys don't panic original question have unique numbers palani haven't read the question properly hence it can be done in O(3n) On Mon, Aug 15, 2011 at 11:28 AM, shady sinv...@gmail.com wrote: it will work only if all numbers are unique On Mon, Aug 15, 2011 at 10:50 AM, Ankur Khurana

Re: [algogeeks] sumitabha das unix ebook ?

2011-08-15 Thread Deoki Nandan
here is the link for sumitbha das ebook http://www.mediafire.com/?ej74twjczauidil On Tue, Aug 16, 2011 at 9:57 AM, MAC macatad...@gmail.com wrote: does anyone has sumitabha das unix ebook for unix ? -- thanks --mac -- You received this message because you are subscribed to the Google

Re: [algogeeks] sumitabha das unix ebook ?

2011-08-15 Thread Deoki Nandan
but this is not whole book only some portion On Tue, Aug 16, 2011 at 10:28 AM, Deoki Nandan deok...@gmail.com wrote: here is the link for sumitbha das ebook http://www.mediafire.com/?ej74twjczauidil On Tue, Aug 16, 2011 at 9:57 AM, MAC macatad...@gmail.com wrote: does anyone has sumitabha

[algogeeks] Re: find numbers whose difference is min

2011-08-15 Thread Dave
@Shuaib: You could sort the numbers in O(n) with a radix sort, and then finding the min is easy. Mind you, the radix sort might be slower than an O(n log n) sort, but still it satisfies the O(n) constraint. Dave On Aug 15, 8:41 pm, Shuaib aries.shu...@gmail.com wrote: That won't work. And I

Re: [algogeeks] Re: find numbers whose difference is min

2011-08-15 Thread siddharam suresh
i feel, it can be done in O(n), find the median of the array, remove the median from the array, again find the median of the array(put back the first median to the array). difference of these two element will be min. Thank you, Siddharam On Tue, Aug 16, 2011 at 10:40 AM, Dave

Re: [algogeeks] Re: find numbers whose difference is min

2011-08-15 Thread Shuaib
That will work but not in all cases as radix sort isn't a generalized sorting algorithm, is it? :) -- Shuaib http://twitter.com/ShuaibKhan http://www.bytehood.com/ On 16-Aug-2011, at 10:10 AM, Dave dave_and_da...@juno.com wrote: @Shuaib: You could sort the numbers in O(n) with a radix sort,

<    1   2