[algogeeks] Arshad Alam wants to chat

2011-08-15 Thread Arshad Alam
--- Arshad Alam wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-17986fa3a6-9ed0657935-7gshjiFXNVkCc0p9ovjThI7gTg0 You'll

[algogeeks] Arshad Alam wants to chat

2011-08-15 Thread Arshad Alam
--- Arshad Alam wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-17986fa3a6-1b6139d3e4-ZSKDUxv0r0n6sm5oT6sx1XWf6oA You'll

Re: [algogeeks]

2011-08-15 Thread vikas singh
TCS also have COBOL project... TCS has every language based project u can think of. it's your luck whether you get the latest technology to work with or the RETRO... On Mon, Aug 15, 2011 at 10:59 AM, vaibhav agrawal agrvaib...@gmail.comwrote: Majorly software maintainence On Mon, Aug 15,

[algogeeks] de shaw ? any link for questions ?

2011-08-15 Thread MAC
can someone please suggest sample ques for de shaw ?? some lnk would help -- 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

[algogeeks] Re: fork() question

2011-08-15 Thread siva viknesh
thanks a lot guys :) On Aug 15, 12:32 am, SuDhir mIsHra sudhir08.mis...@gmail.com wrote: 2) int main() { fork(); fork(); fork(); fork() printf(Hello world!); }  a.out─┬─a.out─┬─a.out─┬─a.out───a.out                                   │       │       └─a.out                            

Re: [algogeeks] SISO

2011-08-15 Thread vikas singh
yes, they all follow the same pattern provided by GLOBAL SAMSUNG APTITUDE TEST (GSAT) On Sun, Aug 14, 2011 at 8:26 PM, parag khanna khanna.para...@gmail.comwrote: itz the same procedure as that of Samsung SEL -- You received this message because you are subscribed to the Google Groups

[algogeeks] Reverse of dutch national flag

2011-08-15 Thread saurabh agrawal
In a given array of elements like [a1, a2, a3, a4, . an, b1, b2, b3, b4, ... bn, c1, c2, c3, c4, cn] without taking a extra memory how to merge like [a1, b1, c1, a2, b2, c2, a3, b3, c3, an, bn, cn] ..??? Time complexity should be o(n). you can not use stack or any

[algogeeks] reason

2011-08-15 Thread Nitin
#includestdio.h #define fun(arg) do\ {\ if(arg)\ printf(have fun...,\n);\ }while(i--) main() { int i=6; fun(i5); } give the answer and please give the reason for this #includestdio.h #define fun(a,b) a##b main() { int a, b, ab; a = 1, b = 2, ab

Fwd: Re: [algogeeks] Re: array question

2011-08-15 Thread Nikhil Veliath
Dave tu mahan hai . . . . -- Forwarded message -- From: Dipankar Patro dip10c...@gmail.com Date: 14 Aug 2011 23:27 Subject: Re: [algogeeks] Re: array question To: algogeeks@googlegroups.com @Dave nice algo. Really like it. So the whole complexity depends on the sorting. On 14

[algogeeks] reason

2011-08-15 Thread Nitin
#includestdio.h main() { int arr[3]={2,3,4}; char *p; p=arr; p=(char *)((int *)(p)); printf(%d,*p); p=(char *)((int *)(p+1)); printf(%d,*p); } it is giving 2,0 why it is giving 0 ..?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to

Re: [algogeeks] reason

2011-08-15 Thread aditi garg
I think dis is bec int occupies 4 bytes while char occupies 1 byte so in the memory when we save as int dey are saved as 2000 3000 4000 now whn u take a char pointer pointing to dis array and u increment it by 1 dey will move only by 1 byte and thus u get 0... u can verify the result by removing

Re: [algogeeks] reason

2011-08-15 Thread Anil Arya
@nitin-- http://www.crazyengineers.com/forum/computer-science-engineering/43458-what-use-c-language.html On Mon, Aug 15, 2011 at 1:51 PM, hary rathor harry.rat...@gmail.com wrote: main() { int i=6; do { if(i5) printf(have fun...,\n);

Re: [algogeeks] reason

2011-08-15 Thread Dipankar Patro
I think while assignment the type conversion will take place. Whether you write it or not. check this out: http://ideone.com/y36vj ^^ Just giving off warnings, but it is working. On 15 August 2011 14:14, aditi garg aditi.garg.6...@gmail.com wrote: I think dis is bec int occupies 4 bytes while

Re: [algogeeks] reason

2011-08-15 Thread programming love
The internal representation of array is this: suppose that the address starts from decimal number 10 and integer occupies 2 bytes 10- 0002 ( num 2 in hex) 12- 0003 ( num 3 in hex) 14- 0004 ( num 4 in hex) Now p points to address 10 and is type char. (Even after type casts) p+1 will increment

Re: [algogeeks] Re: Closest ancestor of two nodes

2011-08-15 Thread Anika Jain
node *common_ancestor(node *root, node **prev, int x,int y) { if(root-a==x || root-a==y) return *prev; else if(root-a x root-a y) { prev=root; return common_ancestor(root-l,prev, x,y); } else if(root-a x root-a

Re: [algogeeks] operating system mcq

2011-08-15 Thread rajeev bharshetty
Timothy J William MCQ's http://s244.filesonic.in/download/1662179664/4e47a18f/6312d950/0/1/b4d72a29/0/49e7f6c2daf916cf807a0678329c153d3324519b On Mon, Aug 15, 2011 at 3:24 AM, nivedita arora vivaciousnived...@gmail.com wrote: hi, can someone pls provide good source from where i can prac mcq

[algogeeks] Algorithm

2011-08-15 Thread contiguous
Design an algorithm to find all elements that appear more than n/2 times in the list. Then do it for elements that appear more than n/4 times. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] operating system mcq

2011-08-15 Thread aditi garg
@rajeev: it is saying that the link has expired...Do u hv any alternative link...?? On Mon, Aug 15, 2011 at 4:21 PM, rajeev bharshetty rajeevr...@gmail.comwrote: Timothy J William MCQ's

Re: [algogeeks] operating system mcq

2011-08-15 Thread rajeev bharshetty
Here is the alternative link http://www.mediafire.com/?e69mami0u2mvt67 On Mon, Aug 15, 2011 at 4:52 PM, aditi garg aditi.garg.6...@gmail.comwrote: @rajeev: it is saying that the link has expired...Do u hv any alternative link...?? On Mon, Aug 15, 2011 at 4:21 PM, rajeev bharshetty

Re: [algogeeks] operating system mcq

2011-08-15 Thread aditi garg
Thanks a lot :) On Mon, Aug 15, 2011 at 5:08 PM, rajeev bharshetty rajeevr...@gmail.comwrote: Here is the alternative link http://www.mediafire.com/?e69mami0u2mvt67 On Mon, Aug 15, 2011 at 4:52 PM, aditi garg aditi.garg.6...@gmail.comwrote: @rajeev: it is saying that the link has

[algogeeks] Any links/resources on Recurrence Relations?

2011-08-15 Thread Navneet Gupta
Looking for a brief reference to solving recurrence relations. (Methods to deduce functions from recurrence relations) -- Regards, Navneet -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

[algogeeks] Re: Design a concurrent hash table

2011-08-15 Thread Navneet Gupta
Any takers? On Thu, Aug 11, 2011 at 3:45 PM, Navneet Gupta navneetn...@gmail.comwrote: Q. Design a concurrent hash table with as much as concurrency as possible. System has multiple readers and writers. System will crash if a reader or writer is reading or writing from a location which is

[algogeeks] Re: Design a concurrent hash table

2011-08-15 Thread Navneet
Did not see i already had replies :) Yeah, from what i know, read-write locks is the way to go about achieving max concurrency. On Aug 15, 5:08 pm, Navneet Gupta navneetn...@gmail.com wrote: Any takers? On Thu, Aug 11, 2011 at 3:45 PM, Navneet Gupta navneetn...@gmail.comwrote: Q. Design a

Re: [algogeeks] Adobe Interview Question

2011-08-15 Thread Anika Jain
i m sorry i cant understand the question.. if there are n no. steps to cross and he can take only one step at a time.. then suppose n=3 then obviously doesnt he need to take step 1 first then step 2 then step 3.. ?? m confused! On Sun, Aug 14, 2011 at 12:38 AM, Kamakshii Aggarwal

[algogeeks] mcq-os

2011-08-15 Thread Kamakshii Aggarwal
semaphores are used to solve the problem of? 1.process synchronization 2.race around 3.mutual exclusion. -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] mcq-os

2011-08-15 Thread aditi garg
process synchronization. On Mon, Aug 15, 2011 at 6:29 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: semaphores are used to solve the problem of? 1.process synchronization 2.race around 3.mutual exclusion. -- Regards, Kamakshi kamakshi...@gmail.com -- You received this message

Re: [algogeeks] mcq-os

2011-08-15 Thread rajeev bharshetty
All the above 1,2,3 Semaphores help to prevent race conditions in a program. They help in process synchronization by allowing multiple processes access to a common shared memory . and they also solve the problem of mutual exclusion allowing only a single process in a critical region at a time.

[algogeeks] Non recursive preorder and postorder

2011-08-15 Thread rohit
Can anyone give algorithm for non recursive preorder and postorder?? -- 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/-/CMDjAwgewoYJ. To post to this group,

Re: [algogeeks] mcq-os

2011-08-15 Thread Dipankar Patro
As stated by Rajeev, 2,3 are a part of process synch. So I also think all 3 On 15 August 2011 18:35, rajeev bharshetty rajeevr...@gmail.com wrote: All the above 1,2,3 Semaphores help to prevent race conditions in a program. They help in process synchronization by allowing multiple processes

[algogeeks] Operators

2011-08-15 Thread aditi garg
Pick the operators whose meaning is context dependent? 1. * 2.# 3. 4.No such operator exists Plz gv the diff contexts if applicable... -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Non recursive preorder and postorder

2011-08-15 Thread Dipankar Patro
Consult Tanenbaum buddy. It has provided a proper in-order traversal code. You will have to think a bit on that on your own too to get to post and pre order. Hint: - Check the sequence in which the elements are pushed and popped in stack. e.g. for pre order, print the node value as you reach any

Re: [algogeeks] Operators

2011-08-15 Thread rajeev bharshetty
Does context dependent means a single operator having different meaning when used in different contexts or scenarios??? If so then * is dereferencing operator for pointers and also an arithmetic operator as *a pointer dereference and a*b multiplication and (bitwise and) and also address operator

Re: [algogeeks] Operators

2011-08-15 Thread Kamakshii Aggarwal
* - used for multiplication as well as dereferencing =use for bit wise and and also for address # also i guess On Mon, Aug 15, 2011 at 6:45 PM, aditi garg aditi.garg.6...@gmail.comwrote: Pick the operators whose meaning is context dependent? 1. * 2.# 3. 4.No such operator exists Plz gv

Re: [algogeeks] Operators

2011-08-15 Thread Dipankar Patro
1 and 3, I guess. * used in multiplication (a*b) and also in pointers(*b). used in bitwise operations (ab)and also as address operator(b). Not sure about '#', haven't used much. On 15 August 2011 18:45, aditi garg aditi.garg.6...@gmail.com wrote: Pick the operators whose meaning is context

[algogeeks] manish patel wants to chat

2011-08-15 Thread manish patel
--- manish patel wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-e026d3feed-141e1c7d4e-IcnixiONDyPSp9FJaVLNNJRPxVI You'll

[algogeeks] regarding amdocs interview questions

2011-08-15 Thread prateek gupta
hey guys, Tell me about amdocs interview questions and also post the good links for preparation as my interview is scheduled on friday. thanks in advance. Regards Prateek Gupta -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: Re: [algogeeks] Re: array question

2011-08-15 Thread mohit verma
thanks guys. On Mon, Aug 15, 2011 at 1:12 PM, Nikhil Veliath nve...@gmail.com wrote: Dave tu mahan hai . . . . -- Forwarded message -- From: Dipankar Patro dip10c...@gmail.com Date: 14 Aug 2011 23:27 Subject: Re: [algogeeks] Re: array question To:

Re: [algogeeks] Algorithm

2011-08-15 Thread Dipankar Patro
For n/2 I came across a nice algo sometime back. here is how to do it (I am providing algo): int A[n], i, num, freq=0; set num = A[0] and freq= 1; // assume first number to be the n/2 times occurring element. from i=1 to n-1 { if (A[i] == num) freq++; else freq--; freq = (freq 0)?

Re: [algogeeks] Adobe Interview Question

2011-08-15 Thread manish patel
actually here jumping of steps mean it can jump over 1 step at max. like if it is at step no 1 he can jump to 3 as well as 2 but not to 4. Soln is Fibonacci eqn. t(n)=t(n-1)+t(n-2); where t(1)=2 and t(2)=3 On Mon, Aug 15, 2011 at 6:06 PM, Anika Jain anika.jai...@gmail.com wrote: i m sorry i

Re: [algogeeks] mcq-os

2011-08-15 Thread Kamakshii Aggarwal
I am confused about the race around..according to me it should be included with other options,but in the book which i am referring its not included.. On Mon, Aug 15, 2011 at 6:35 PM, rajeev bharshetty rajeevr...@gmail.comwrote: All the above 1,2,3 Semaphores help to prevent race conditions in

[algogeeks] program puzzle

2011-08-15 Thread programming love
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 programmer the output should be programmer a am i -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

Re: [algogeeks] Operators

2011-08-15 Thread arvind kumar
* is contexxt dependent..it can be multiplication or used to define and indicate pointers. # is context dependent mainly d diff is btwn #include(for header files) and #define(for constants,aliases,etc.) is bitwise AND or can be used for ADDRESS OF operator also. Pls add or remove anything if

Re: [algogeeks] operating system mcq

2011-08-15 Thread Kamakshii Aggarwal
@rajeev: this link is not working... On Mon, Aug 15, 2011 at 4:21 PM, rajeev bharshetty rajeevr...@gmail.comwrote: Timothy J William MCQ's http://s244.filesonic.in/download/1662179664/4e47a18f/6312d950/0/1/b4d72a29/0/49e7f6c2daf916cf807a0678329c153d3324519b On Mon, Aug 15, 2011 at 3:24

Re: [algogeeks] Operators

2011-08-15 Thread sukran dhawan
* it can be used as a deferencing operator in pointers or in multiplication On Mon, Aug 15, 2011 at 6:45 PM, aditi garg aditi.garg.6...@gmail.comwrote: Pick the operators whose meaning is context dependent? 1. * 2.# 3. 4.No such operator exists Plz gv the diff contexts if applicable...

Re: [algogeeks] Operators

2011-08-15 Thread sukran dhawan
even 2 On Mon, Aug 15, 2011 at 6:53 PM, Dipankar Patro dip10c...@gmail.com wrote: 1 and 3, I guess. * used in multiplication (a*b) and also in pointers(*b). used in bitwise operations (ab)and also as address operator(b). Not sure about '#', haven't used much. On 15 August 2011 18:45,

Re: [algogeeks] Operators

2011-08-15 Thread Kamakshii Aggarwal
@rajeev:+1 On Mon, Aug 15, 2011 at 6:50 PM, rajeev bharshetty rajeevr...@gmail.comwrote: Does context dependent means a single operator having different meaning when used in different contexts or scenarios??? If so then * is dereferencing operator for pointers and also an arithmetic operator

Re: [algogeeks] operating system mcq

2011-08-15 Thread priya ramesh
Do anyone of you have c++ MCQ book?? Perhaps test your c++ skills by kanetkar?? I'm not able to find good resources on net. Plz help by snding e books or docs -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email

Re: [algogeeks] Non recursive preorder and postorder

2011-08-15 Thread sukran dhawan
On Mon, Aug 15, 2011 at 6:37 PM, rohit raman.u...@gmail.com wrote: Can anyone give algorithm for non recursive preorder and postorder?? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] mcq-os

2011-08-15 Thread sandeep pandey
ya i also think all of d above.. -- 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

Re: [algogeeks] program puzzle

2011-08-15 Thread sukran dhawan
reverse(string,n) // do it in place p = str; for(i=0;ilength(str);i++) { if(str[i] == '\0' || str[i] == ' ') { reverse(p,len); p = p+len+1; len = 0; } else len++; } On Mon, Aug 15, 2011 at 4:48 PM, programming love love.for.programm...@gmail.com wrote:

Re: [algogeeks] operating system mcq

2011-08-15 Thread rajeev bharshetty
@kamakshi : Check for the mediafire link and not the filesonic link http://www.mediafire.com/?e69mami0u2mvt67 On Mon, Aug 15, 2011 at 5:12 PM, priya ramesh love.for.programm...@gmail.com wrote: Do anyone of you have c++ MCQ book?? Perhaps test your c++ skills by kanetkar?? I'm not able to

Re: [algogeeks] operating system mcq

2011-08-15 Thread sukran dhawan
read c++ complete reference On Mon, Aug 15, 2011 at 5:12 PM, priya ramesh love.for.programm...@gmail.com wrote: Do anyone of you have c++ MCQ book?? Perhaps test your c++ skills by kanetkar?? I'm not able to find good resources on net. Plz help by snding e books or docs -- You received

Re: [algogeeks] mcq-os

2011-08-15 Thread rajeev bharshetty
@kamakshi : Check this link. It has a very good explanation http://stargazer.bridgeport.edu/sed/projects/cs503/Spring_2001/kode/os/sync.htm On Mon, Aug 15, 2011 at 6:37 PM, sandeep pandey sandeep.masum4...@gmail.com wrote: ya i also think all of d above.. -- You received this message

[algogeeks] Re: Non recursive preorder and postorder

2011-08-15 Thread Don
It can be done without using a stack, by using the pointers in the node to keep track of the path back up the tree. The algorithm will temporarily modify the tree, but when completed the tree will be restored to its original state. Don On Aug 15, 8:07 am, rohit raman.u...@gmail.com wrote: Can

Re: [algogeeks] mcq-os

2011-08-15 Thread Kamakshii Aggarwal
@rajeev:thanks a lot..the link is really very nice..:) On Mon, Aug 15, 2011 at 7:41 PM, rajeev bharshetty rajeevr...@gmail.comwrote: @kamakshi : Check this link. It has a very good explanation http://stargazer.bridgeport.edu/sed/projects/cs503/Spring_2001/kode/os/sync.htm On Mon, Aug 15,

Re: [algogeeks] program puzzle

2011-08-15 Thread MeHdi KaZemI
string str = i am a programmer for(int i = 0; i str.size()/2; i ++) swap(str[i], str[str.size()-i-1]); time complexity O(n) On Mon, Aug 15, 2011 at 6:39 PM, sukran dhawan sukrandha...@gmail.comwrote: reverse(string,n) // do it in place p = str; for(i=0;ilength(str);i++) {

Re: [algogeeks] Re: akamai.....

2011-08-15 Thread Shravanthi U M
In Bangalore Institute of Technology, bangalore regards, Shravanthi U M http://shravanthimohan.wordpress.com -- 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

Re: [algogeeks] Find the number of occurences of maximum sum in given array.

2011-08-15 Thread sukran dhawan
use kadane 's algorithm On Mon, Aug 15, 2011 at 8:46 PM, Bharat Kul Ratan bharat.kra...@gmail.comwrote: We've to count how many the times the maximum sum occurs in an array. Value of maximum sum includes only contiguous elements and is defined as addition of elements. For example, if given

Re: [algogeeks] Re: citrix rd????

2011-08-15 Thread sagar pareek
C++ On Mon, Aug 15, 2011 at 12:37 AM, htross htb...@gmail.com wrote: should i study OOP concepts in c++ for the written test?? On Aug 14, 2:49 pm, sagar pareek sagarpar...@gmail.com wrote: in networking give emphasis on protocols like ARP, DHCP and all On Sun, Aug 14,

Re: [algogeeks] program puzzle

2011-08-15 Thread Dipankar Patro
@ MeHdi : Please read the problem properly yaar. You are just reversing the string by characters, not by words. On 15 August 2011 20:34, MeHdi KaZemI mehdi.kaze...@gmail.com wrote: string str = i am a programmer for(int i = 0; i str.size()/2; i ++) swap(str[i], str[str.size()-i-1]);

Re: [algogeeks] array ques

2011-08-15 Thread sagar pareek
int lol=2; // total lol's encountered upto now lol++; On Mon, Aug 15, 2011 at 12:41 AM, aditi garg aditi.garg.6...@gmail.comwrote: lol On Mon, Aug 15, 2011 at 12:40 AM, aditya kumar aditya.kumar130...@gmail.com wrote: @aditi : sry i dint realise that n log n .:P On Mon, Aug 15, 2011

Re: [algogeeks] Find the number of occurences of maximum sum in given array.

2011-08-15 Thread Adi Srikanth
u can use count sort or bucket sort, hashing Regards, Adi Srikanth. Mob No 9887233349 Personal Pages: adisrikanth.co.nr On Mon, Aug 15, 2011 at 8:54 PM, sukran dhawan sukrandha...@gmail.comwrote: use kadane 's algorithm On Mon, Aug 15, 2011 at 8:46 PM, Bharat Kul Ratan

Re: [algogeeks] Re: citrix rd????

2011-08-15 Thread malay chakrabarti
oops specific c++ or just c++ basics? On Mon, Aug 15, 2011 at 9:03 PM, sagar pareek sagarpar...@gmail.com wrote: C++ On Mon, Aug 15, 2011 at 12:37 AM, htross htb...@gmail.com wrote: should i study OOP concepts in c++ for the written test?? On Aug 14, 2:49 pm, sagar pareek

Re: [algogeeks] Re: citrix rd????

2011-08-15 Thread priya ramesh
@sagar: Can you please upload important c++ docs?? I have no idea what to emphasize on in c++ and my placements starting in sometime. Plz help -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to

Re: [algogeeks] Find the number of occurences of maximum sum in given array.

2011-08-15 Thread Bharat Kul Ratan
@sukran: I've gone through Kadane's algo but I was looking for the number of times the sum appears especially cases involving zeros. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] Find the number of occurences of maximum sum in given array.

2011-08-15 Thread sukran dhawan
u can keep a counter for the number of max values.not sure whether the algo works for zero.u can extend the algo i guess.correct me if i m wrong On Mon, Aug 15, 2011 at 9:34 PM, Bharat Kul Ratan bharat.kra...@gmail.comwrote: @sukran: I've gone through Kadane's algo but I was looking for the

[algogeeks] Re: Non recursive preorder and postorder

2011-08-15 Thread Navneet
I think only condition given is not to use recursion, so auxiliary data structures can be used. On Aug 15, 7:30 pm, ankit sambyal ankitsamb...@gmail.com wrote: Morris in order traversal will do in order traversal without using recursion or a stack. -- You received this message because you

Re: [algogeeks] Re: Non recursive preorder and postorder

2011-08-15 Thread sukran dhawan
u can use threaded binary trees to avoid stacking On Mon, Aug 15, 2011 at 9:48 PM, Navneet navneetn...@gmail.com wrote: I think only condition given is not to use recursion, so auxiliary data structures can be used. On Aug 15, 7:30 pm, ankit sambyal ankitsamb...@gmail.com wrote: Morris in

[algogeeks] amazon question

2011-08-15 Thread priya ramesh
You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as

Re: [algogeeks] amazon question

2011-08-15 Thread rajeev bharshetty
First approach : I think you can solve the above problem using Levenshtein Distance (edit distance which is basically no of operations required to transform word1 to word2) . Algo can be found here http://en.wikipedia.org/wiki/Levenshtein_distance Second approach : Store the words in trie

[algogeeks] Re: program puzzle

2011-08-15 Thread Don
#include ctype.h #include string.h int main(int argc, char* argv[]) { char line[500]; char tmp[500]; char *words[100]; int wordCount = 0; char *p, *wordStart=0; printf(Enter string:); fgets(line,500,stdin); for(p = line; *p; ++p)

Re: [algogeeks] Re: program puzzle

2011-08-15 Thread Pervinder Singh
First reverse the whole sentence and then reverse every word of the sentence Example : I am a programmer Step 1 Reverse entire sentence remmargorp a ma I Step 2 Now reverse every word in a sentence programmer a am I Complexity O(n) On Mon, Aug 15, 2011 at 10:22 PM, Don dondod...@gmail.com

[algogeeks] Re: operating system mcq

2011-08-15 Thread TheMitraBoy
Try Written Test Questions in C++ by Kanetkar. Its a good collection of MCQs specific to C++ On Aug 15, 4:42 pm, priya ramesh love.for.programm...@gmail.com wrote: Do anyone of you have c++ MCQ book?? Perhaps test your c++ skills by kanetkar?? I'm not able to find good resources on net. Plz

Re: [algogeeks] Re: operating system mcq

2011-08-15 Thread priya ramesh
@mitra: can you plz mail the e book if you have?? -- 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] Re: an array question

2011-08-15 Thread Puneet Gautam
I think this may work..!! Sort the input array first, extract each no.s first digit and put them in another array.. Then compare each element of new array with fist digit of main array.. and then concatenate the found ones to a string... eg:if input a[]=34,567,87,98,33,1, new array

Re: [algogeeks] Re: an array question

2011-08-15 Thread Puneet Gautam
sorry, concatenate the found no in the new no rather than putting it in the new no... On 8/15/11, Puneet Gautam puneet.nsi...@gmail.com wrote: I think this may work..!! Sort the input array first, extract each no.s first digit and put them in another array.. Then compare each element of

Re: [algogeeks] Find the number of occurences of maximum sum in given array.

2011-08-15 Thread sandeep pandey
i think this wl work. #includecstdio long long int myread() { char str[20]; long long int sum,i; scanf(%s,str); for(i=0,sum=0;str[i];i++) sum =(sum*10)+str[i]-'0'; return sum; } long

Re: [algogeeks] program puzzle

2011-08-15 Thread siddharth srivastava
On 15 August 2011 16:48, programming love love.for.programm...@gmail.comwrote: write a program to reverse the words in a give string. also state the time complexity of the algo. It has already been discussed on the list a few days ago if the string is i am a programmer the output should

[algogeeks] A problem asked in a contest

2011-08-15 Thread cegprakash
given the sum and product of n numbers we have to find those numbers(any one possibility) sum, product and n are inputs... for example if the sum is 10, product is 36 and n is 3 then 3,3,4 is a possible solution... if it is impossible we should print NO i wrote this code.. is there any faster

Re: [algogeeks] array ques

2011-08-15 Thread siddharth srivastava
On 15 August 2011 21:07, sagar pareek sagarpar...@gmail.com wrote: int lol=2; // total lol's encountered upto now lol++; it is a programming mistake as you have indicated the value of the important variable constant lol to 2 and then you have incremented it. :P On Mon, Aug 15, 2011 at

Re: [algogeeks] program puzzle

2011-08-15 Thread *$*
method 1: algo: step 1 :reverse entire string .. (letter by letter) step 2: take two pointers ... keep first pointer at the starting of the word ... keep incrementing the second pointer , till space hits.. then , swap first pointer and second pointere data , by incrementing first pointer , and

[algogeeks] Re: operating system mcq

2011-08-15 Thread siva viknesh
For cpp buy test ur cpp skills by kanethkarits really awesome..u can even buy a new book ..its worth On Aug 15, 10:23 pm, priya ramesh love.for.programm...@gmail.com wrote: @mitra: can you plz mail the e book if you have?? -- You received this message because you are subscribed to the

Re: [algogeeks] program puzzle

2011-08-15 Thread priya ramesh
@gopi: Each word is being accessed thrice. 1. reverse string 2. set pointers to beginning n end of string 3. reverse the word. If this is the came is the complexity O(n)?? It's a very good algo nevertheless :) On Mon, Aug 15, 2011 at 9:16 PM, *$* gopi.komand...@gmail.com wrote: method 1:

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Neha Gupta
I am in IGIT ( in kashmere gate ) -- 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

Re: [algogeeks] Win Shuttle

2011-08-15 Thread sandeep pandey
outsider allowed..? -- 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

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Neha Gupta
@sandeepwhich college? -- 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

Re: Re: [algogeeks] Re: array question

2011-08-15 Thread PramodP
Step 1: Sort the smaller array mlogm Step 2: For every element in the bigger array, do a binary search on this sorted smaller array. n*logm Total complexity (m+n)logm You could sort the other array and binary search from the smaller array but then it would be (m+n)logn which is bigger than

Re: [algogeeks] Win Shuttle

2011-08-15 Thread sandeep pandey
AKGEC..! -- 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

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
I am recruited by WinShuttle this year. From what I saw in their process, Round 1 : Tricky C Questions and Aptitude Round 2 : An algorithmic problem to code in efficient time, its a bit tricky(if u got the idea, u can do it quickly) Round 3 : Technical Interview(Basic data structure

Re: [algogeeks] Win Shuttle

2011-08-15 Thread sandeep pandey
so sanjay... can i also apply for this comapny via offcampus? -- 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] Win Shuttle

2011-08-15 Thread Neha Gupta
@Sanjaythanx for infoplz share the ques asked if possible. and yes congrats and wats the package ? -- 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

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
Well I dont know about this. You can visit their website. 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:05 PM, sandeep pandey sandeep.masum4...@gmail.com wrote: so

Re: [algogeeks] Win Shuttle

2011-08-15 Thread sandeep pandey
@sanjay please send me link..? -- 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

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
@sandeep : www.winshuttle.com 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:08 PM, sandeep pandey sandeep.masum4...@gmail.com wrote: @sanjay please send me

Re: [algogeeks] Win Shuttle

2011-08-15 Thread sandeep pandey
thanks.! -- 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

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Neha Gupta
@sanjay and simran.plz tell some specific ques if possible. -- 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] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
@Neha : well i dont remember questions, but I can say they were easy. But yes, you should know what is written in your resume,e.g. if u have learnt a s/w, a newer and older version, then wat r the new features in the newer version ? etc. Hope it helps.

[algogeeks] sandeep pandey wants to chat

2011-08-15 Thread sandeep pandey
--- sandeep pandey wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-909e2cbded-f3ffa2ff99-bgxORlZvy-IJJlmDN79ifLdMC8Q

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Neha Gupta
thanx sanjay for ur valuable suggestions :) -- 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.

Re: [algogeeks] Win Shuttle

2011-08-15 Thread Sanjay Rajpal
@Neha : Can u do me a favour ? When the comany will come to ur campus, can u ask the inhand salary per month for me ? I forgot that(CTC is 7 LPA @ NITK). By the way where r u from ? and would u tell me CTC @ ur campus and ask them inhand per

  1   2   >