Re: [algogeeks] problem with array

2011-08-03 Thread Thavasi Subramanian
Also take[] cannot be an array... It should be a pointer since function cannot return more than one value. On 3 August 2011 11:41, Thavasi Subramanian sktthav...@gmail.com wrote: Here take is a pointer local to fn main() and array3[10] is local to fn modify. So array3's entire locations are

[algogeeks] Re: latest google interview questions

2011-08-03 Thread kaustubh
You've got to be kiddin' me... On Aug 3, 12:55 am, UTKARSH SRIVASTAV usrivastav...@gmail.com wrote: hi I got intern in google ...but i was not able to do some question of written paper 1. main() {          printf(hello);} OUTPUT-  hello Why the output is coming hello? 2.  Who developed

Re: [algogeeks] problem with array

2011-08-03 Thread sagar pareek
here u have taken array *take*[] as constant...change its declaration to int* yake; then it will not give u error On Wed, Aug 3, 2011 at 11:41 AM, Thavasi Subramanian sktthav...@gmail.comwrote: Here take is a pointer local to fn main() and array3[10] is local to fn modify. So array3's entire

Re: [algogeeks] Malloc()

2011-08-03 Thread Ashish Goel
refer http://web.eecs.utk.edu/~plank/plank/classes/cs360/360/notes/Malloc1/lecture.html http://www.cs.colorado.edu/homes/zorn/public_html/MallocDebug.html understand sbrk, mmap, vmalloc Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Tue, Aug 2,

Re: [algogeeks] problem with array

2011-08-03 Thread Arshad Alam
@Subramanian, I made the changes what you have told, it is running fine,not giving any warning or error but output is not desirable On Wed, Aug 3, 2011 at 11:41 AM, Thavasi Subramanian sktthav...@gmail.comwrote: Here take is a pointer local to fn main() and array3[10] is local to fn modify.

[algogeeks] Data structure question!!!!!!!

2011-08-03 Thread AMAN AGARWAL
Hi, Convert a BST to max heap without using extra memory and in as optimum time as possible. -- AMAN AGARWAL Success is not final, Failure is not fatal: It is the courage to continue that counts! -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] problem with array

2011-08-03 Thread Thavasi Subramanian
@Alam: Can u mail tat revised code On 3 August 2011 11:54, Arshad Alam alam3...@gmail.com wrote: @Subramanian, I made the changes what you have told, it is running fine,not giving any warning or error but output is not desirable On Wed, Aug 3, 2011 at 11:41 AM, Thavasi Subramanian

Re: [algogeeks] problem with array

2011-08-03 Thread Thavasi Subramanian
@Alam, Try this revised code #includestdio.h #includeconio.h int array3[10]; main() { clrscr(); int *take,i; int array1[10]={1,2,3,4,5,6,7,8,9,10}; int* modify(int*); take=modify(array1); for(i=0;i10;i++) printf(%d ,*(take+i)); getch(); } int* modify(int*

[algogeeks] student and company match algo

2011-08-03 Thread MAC
Suppose you have N companies visiting your college and your college has N students . You as placement coordinator knows that each student will get placed and your college policy is that each student can take ONLY 1 job and each company can take ONLY 1 student . Each student has told the placement

Re: [algogeeks] Data structure question!!!!!!!

2011-08-03 Thread AMAN AGARWAL
Can you please suggest me your approch. Plaese give a code snippet for your approach. On Wed, Aug 3, 2011 at 12:13 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote: nlogn ? On Wed, Aug 3, 2011 at 12:10 PM, AMAN AGARWAL mnnit.a...@gmail.comwrote: Hi, Convert a BST to max heap without using

Re: [algogeeks] problem with array

2011-08-03 Thread Arshad Alam
@Subramanian-- great man, thanx alot. actually what I does is I had define array3 inside the main function instead of globally, you had told me to define array3 globally but by mistake I defined it inside the main function which was my fault... thanx alot brother. On Wed, Aug 3, 2011 at 1:36 PM,

Re: [algogeeks] student and company match algo

2011-08-03 Thread Ashish Modi
Its a problem derived from Stable Marriage Problem, Google it u'll find sol. On Wed, Aug 3, 2011 at 1:54 PM, MAC macatad...@gmail.com wrote: Suppose you have N companies visiting your college and your college has N students . You as placement coordinator knows that each student will get placed

[algogeeks] Data structure question!!!!

2011-08-03 Thread AMAN AGARWAL
Hi, Convert a min heap to BST without changing its structure and of course no extra space. Please post a code snippet also. -- AMAN AGARWAL Success is not final, Failure is not fatal: It is the courage to continue that counts! -- You received this message because you are subscribed to the

[algogeeks] Re: Goldman sachs

2011-08-03 Thread Ved
Questions were from C language lik Pointers and wat will b the output of the code , Errors etc. Clearing written test is not that tough u shud manage time and solve technical which will b 10 ques first den try aptitude .. All the Best On Aug 3, 12:10 am, arvind kumar arvindk...@gmail.com

Re: [algogeeks] what wil be o/p

2011-08-03 Thread Arun Vishwanathan
hi i have a slight confusion..i got the above explanation but i have a doubt as in when u say int arr[5], arr is also the pointer to the first element of the array right?..so size(arr) shudnt be the size of pointer (which is int 4 byte address it holds of the first array element?) ..is it not

Re: [algogeeks] Re: Sort IT

2011-08-03 Thread Arun Vishwanathan
yes dave it wud be better if u cud post an explanation of what u r doing in each step..thanks On Wed, Aug 3, 2011 at 6:51 AM, payel roy smithpa...@gmail.com wrote: @Dave, Can you please explain the algo? It's getting very difficult to understand the code .. On 3 August 2011 01:14, Dave

Re: [algogeeks] what wil be o/p

2011-08-03 Thread Thavasi Subramanian
You can make use of the array name to get the starting address of the array... Since you allocate memory statically( arr[5] ) the compiler reserves 5 locations to store 5 integer values. The size will not exceed 20 (if each integer occupies 4 bytes) and the locations are reserved and maximum

Re: [algogeeks] what wil be o/p

2011-08-03 Thread Sandeep Jain
When you refer to an array name, it is usually interpreted as the address of the first element of the array, (try not calling it pointer to the first element its less confusing that ways) However there are exceptions, 1) When used as a parameter to sizeof, it returns the total number of bytes

Re: [algogeeks] what wil be o/p

2011-08-03 Thread Arun Vishwanathan
hmm i get it..thanks sandeep and thavasi... i guess i was confused cos arr holds address of first element of array so it forced me to think along lines of a pointer only... @sandeep: i guess yes when u mention as exceptions then only it is understandable cos as a general interpretation it is

Re: [algogeeks] what wil be o/p

2011-08-03 Thread Arun Vishwanathan
*chunk On Wed, Aug 3, 2011 at 11:40 AM, Arun Vishwanathan aaron.nar...@gmail.comwrote: hmm i get it..thanks sandeep and thavasi... i guess i was confused cos arr holds address of first element of array so it forced me to think along lines of a pointer only... @sandeep: i guess yes when u

Re: [algogeeks] Re: Goldman sachs

2011-08-03 Thread Kunal Patil
I agree with Ved that Apti of GS is really really tough and technical is relatively easy..They ask CAT (Quant) like questions and you have to solve them in little time too...Also there will be sectional cut-off for this written test. So dont be afraid if you can solve only 10-15 questions from

Re: [algogeeks] Complexity Help..

2011-08-03 Thread ankit sambyal
@Aanchal : My mistake... Its complexity can't be O(n^2) -- 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] C question.. sizeof operator

2011-08-03 Thread brijesh
main() { int i,j; i=10; j=sizeof(++i); printf(%d,i); } please give the output with explanation! -- 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,

Re: [algogeeks] Amazon Question

2011-08-03 Thread Arun Vishwanathan
it cud also be 0011 On Wed, Aug 3, 2011 at 6:54 AM, payel roy smithpa...@gmail.com wrote: It is contiguous ...the answer will be 0110. On 2 August 2011 20:59, ankit sambyal ankitsamb...@gmail.com wrote: @payel : Is it sub-sequence or sub-array ?? A sub-sequence may not be continuous but

Re: [algogeeks] C question.. sizeof operator

2011-08-03 Thread sachin sharma
output would be 10 size of just calculate the type of the expression not the value Best Wishes Sachin Sharma -- 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] C question.. sizeof operator

2011-08-03 Thread Rajeshwar Patra
i=10 -- *Rajeshwar Patra,* *MCA final year,* *Nit Durgapur* -- 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] Re: Sort IT

2011-08-03 Thread Dave
@Payel: Look up Radix sort and then read the comments in the code. Dave On Aug 2, 11:51 pm, payel roy smithpa...@gmail.com wrote: @Dave, Can you please explain the algo? It's getting very difficult to understand the code .. On 3 August 2011 01:14, Dave dave_and_da...@juno.com wrote:

[algogeeks] Re: Sort IT

2011-08-03 Thread Dave
@Arun: Look up Radix sort and then read the comments in the code. Dave On Aug 3, 4:23 am, Arun Vishwanathan aaron.nar...@gmail.com wrote: yes dave it wud be better if u cud post an explanation of what u r doing in each step..thanks On Wed, Aug 3, 2011 at 6:51 AM, payel roy

Re: [algogeeks] C question.. sizeof operator

2011-08-03 Thread Xiaoxiao Qin
sizeof is not a function. The inside content in sizeof() cannot be compiled during the compiling time, It will be replaced with the type. For example, compiler will replace the code as j = 4; So ++i does not execute. On Aug 3, 2011, at 6:12 PM, brijesh wrote: main() { int i,j; i=10;

[algogeeks] C question.. increment decrement operator..

2011-08-03 Thread brijesh
Please give the output and explain.. main() { int i=7; printf(%d\n,i++*i++); printf(%d\n,i++*++i); printf(%d\n,++i*i++); printf(%d\n,++i*++i); } What is the order of execution!? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this

[algogeeks] Amazon Question

2011-08-03 Thread ankit sambyal
Given two lists write a function which returns a list which is the intersection of the two lists.the original lists should remain same. (Intersection - if first list is say,1,20 3,45 and second list is 3,24 ,45,90,68 then intersection should be 3,45 ) -- You received this message because you are

Re: [algogeeks] Amazon Question

2011-08-03 Thread UMESH KUMAR
Order would be O(m*n)... On Wed, Aug 3, 2011 at 4:01 AM, ankit sambyal ankitsamb...@gmail.comwrote: Given two lists write a function which returns a list which is the intersection of the two lists.the original lists should remain same. (Intersection - if first list is say,1,20 3,45

Re: [algogeeks] Amazon Question

2011-08-03 Thread Prakash D
someone post all the questions asked by amazon pls.. it'll be useful On Wed, Aug 3, 2011 at 3:43 PM, Arun Vishwanathan aaron.nar...@gmail.comwrote: it cud also be 0011 On Wed, Aug 3, 2011 at 6:54 AM, payel roy smithpa...@gmail.com wrote: It is contiguous ...the answer will be 0110. On 2

[algogeeks] MS [Written Question]

2011-08-03 Thread Poised~
I am not looking for answer. Just sharing these Section 2 questions: 1. Given an array arr[] of n integers, construct a Product Array prod[] (of same size) such that prod[i] is equal to the product of all the elements of arr[] except arr[i]. Solve it without division operator. Give an efficient

[algogeeks] Morgan Stanley

2011-08-03 Thread swetha rahul
Hi, Can anyone say about the interview process of Morgan Stanley..What kind of questions are asked in written test..??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

Re: [algogeeks] C question.. increment decrement operator..

2011-08-03 Thread ankit sambyal
Its compiler dependent. Acc. to the C standard an object's stored value can be modified only once in an expression. -- 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

Re: [algogeeks] Amazon Question

2011-08-03 Thread ankit sambyal
ya, I also can't think anything better than O(m*n) -- 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] Re: MS [Written Question]

2011-08-03 Thread Poised~
Section 1 problems. Total time 30 minutes: 1. x = x^x; printf(%d, x); o/p? 2. some automation-graph question. I think it was based on Automata. Not sure though. 3. z = scanf(%d %d, x, y); printf(%d, z); o/p? 4. a question on double loop. o/p related. 5. double round(double num) { return

[algogeeks] Re: MS [Written Question]

2011-08-03 Thread Poised~
Section 1 problems. Total time 30 minutes: 1. x = x^x; printf(%d, x); o/p? 2. some automation-graph question. I think it was based on Automata. Not sure though. 3. z = scanf(%d %d, x, y); printf(%d, z); o/p? 4. a question on double loop. o/p related. 5. double round(double num) { return

Re: [algogeeks] Amazon Question

2011-08-03 Thread veera reddy
there is o(m+n) solution . http://geeksforgeeks.org/?p=2405 in this link see method no 4 On Wed, Aug 3, 2011 at 4:41 PM, ankit sambyal ankitsamb...@gmail.comwrote: ya, I also can't think anything better than O(m*n) -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Amazon Question

2011-08-03 Thread veera reddy
sry... misunderstood the question On Wed, Aug 3, 2011 at 4:43 PM, veera reddy veeracool...@gmail.com wrote: there is o(m+n) solution . http://geeksforgeeks.org/?p=2405 in this link see method no 4 On Wed, Aug 3, 2011 at 4:41 PM, ankit sambyal ankitsamb...@gmail.comwrote: ya, I also can't

Re: [algogeeks] Amazon Question

2011-08-03 Thread Nitin Nizhawan
why not first sort the lists first? (we could if we do not want to modify original list) it will give O(nLogn) solution -Nitin On Wed, Aug 3, 2011 at 4:44 PM, veera reddy veeracool...@gmail.com wrote: sry... misunderstood the question On Wed, Aug 3, 2011 at 4:43 PM, veera reddy

Re: [algogeeks] Amazon Question

2011-08-03 Thread Nitin Nizhawan
EDIT: why not first sort the lists first? (we can create copy if we do not want to modify original list) it will give O(nLogn) solution -Nitin On Wed, Aug 3, 2011 at 4:59 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote: why not first sort the lists first? (we could if we do not want to

Re: [algogeeks] MS [Written Question]

2011-08-03 Thread ankit sambyal
For question 1: Take 2 arrays prod_before[N] and prod_after[N] which hold product of elements before and after i respectively For i=1 to N-1 calculate prod_before[i] For i=N-2 to 0 calculate prod_after[i] prod_before[0]=prod_after[N-1]=1 For i=0 to N-1 prod[i]=prod_before[i] *

Re: [algogeeks] Amazon Question

2011-08-03 Thread Kunal Patil
Sort both the lists... (Keep track of their original indices as we need to return to original list) Modify the merge process of merge_sort: // Assume size of list1 is m and that of list2 is n curr_list1=0;curr_list2=0;curr_output=0; while( curr_list1 m curr_list2 n ) { If

Re: [algogeeks] MS [Written Question]

2011-08-03 Thread ankit sambyal
For question 2: 1. check with empty string. 2. check with a string which is in the file 3. check with a string which is not in the file 4.check with a string which has a different case as that in the file. eg. if the file contains structure and does not contain Structure, check find and replace

Re: [algogeeks] MS [Written Question]

2011-08-03 Thread ankit sambyal
Anybody having any of question 3 ??? -- 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

[algogeeks] interview questions

2011-08-03 Thread pacific :-)
I couldn't find the solution to this problem please help. Find the *first unique* string from a list of strings in *one pass.* * * *unique : *It occurs only once in the list. *one pass : *you are allowed to traverse the list only once. -- regards, chinna. -- You received this message because

Re: [algogeeks] Re: MS [Written Question]

2011-08-03 Thread ankit sambyal
@Poised: Whats the answer of : double round(double num) { return (int)(num+0.5) } will it work all the time? I think the answer should be Yes. -- 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: Minimum cuts required so that each sub string is a palindrome

2011-08-03 Thread amit karmakar
Let the given string have a length N and contain characters indexed from 1 on to N. Let, f(n) denote the minimum number of cuts that you need to make such that each substring is a palindrome, considering only the prefix containing n characters. f(0) = -1 f(n) = min( f(x) + 1 ), take x such that

Re: [algogeeks] C question.. increment decrement operator..

2011-08-03 Thread Puneet Gautam
As we know: In an expression, if pre n post occur simultaneously, pre inc the value then n there only n post executes it after that expression...and expression evaluates right to left... Also, the value of a variable in an expression can be modified multifold times...there

Re: [algogeeks] Re: MS [Written Question]

2011-08-03 Thread Poised~
@ samby : (int) (num+0.5), works only for positive integers. e.g (int) (-2+0.5) = -1. so the answer is, it works half the times. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

[algogeeks] Re: MS [Written Question]

2011-08-03 Thread Gene
Your solution to 1 works fine. I hope you get the job. But it needs O(N) additional storage for the stack. You can also do with constant additional storage. #include stdio.h int main(void) { #define N (sizeof a / sizeof a[0]) int a[] = {7, 9, 4, 8, 2}; int result[N], i, product; for (i = 0,

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread Puneet Gautam
@Utkarsh: How did u get the intern...? it cant be ...!!! Who is the moderator of this group..? I want this thread be removed immediately from this group...!!! pls do it... On 8/3/11, kaustubh kaustubh.c...@gmail.com wrote: You've got to be kiddin' me... On Aug 3, 12:55 am, UTKARSH SRIVASTAV

[algogeeks] aptitude

2011-08-03 Thread Kamakshii Aggarwal
A car is traveling at a uniform speed.The driver sees a milestone showing a 2-digit number. After traveling for an hour the driver sees another milestone with the same digits in reverse order.After another hour the driver sees another milestone containing the same two digits. What is the average

[algogeeks] data type size problem

2011-08-03 Thread Rajesh Kumar
why output of this code goes to infinite. #includestdio.h main() { unsigned int i=4294967295;//size of unsigned int is 4 byte while(i++!=0) printf(%d,++i); printf(\n); } Regards Rajesh Kumar -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group.

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread keyan karthi
:D :D r u serious dude ?? On 8/3/11, Puneet Gautam puneet.nsi...@gmail.com wrote: @Utkarsh: How did u get the intern...? it cant be ...!!! Who is the moderator of this group..? I want this thread be removed immediately from this group...!!! pls do it... On 8/3/11, kaustubh

Re: [algogeeks] Re: Goldman sachs

2011-08-03 Thread arvind kumar
Hi Thanks a lot,both if u:):) On Wed, Aug 3, 2011 at 3:19 PM, Kunal Patil kp101...@gmail.com wrote: I agree with Ved that Apti of GS is really really tough and technical is relatively easy..They ask CAT (Quant) like questions and you have to solve them in little time too...Also there will be

[algogeeks] Re: data type size problem

2011-08-03 Thread ManishMCS
It is going to infinite because 4294967295 is not equal to 0, so you enters the loop. And in loop, you again increments the value.. So, it print values lyk 1 3.. 4294967295 and again 1.. So, basically it prints all odd values... -- You received this message because you are subscribed to the

[algogeeks] Re: C question.. increment decrement operator..

2011-08-03 Thread amit karmakar
You are wrong. The above program invokes undefined behavior. Read the standard language draft to know about sequence points, side effects and undefined behavior. Between a previous and next sequence point a variable's value cannot be modified twice. c-faq should be quite useful

Re: [algogeeks] Re: C question.. increment decrement operator..

2011-08-03 Thread Arun Vishwanathan
@amit:+1 On Wed, Aug 3, 2011 at 3:14 PM, amit karmakar amit.codenam...@gmail.comwrote: You are wrong. The above program invokes undefined behavior. Read the standard language draft to know about sequence points, side effects and undefined behavior. Between a previous and next sequence

[algogeeks] Re: MS [Written Question]

2011-08-03 Thread Ashish Sachdeva
@poised: i think this: double round(double num) { return (int)(num+0.5) } works for all... http://www.ideone.com/WfEIw On Aug 3, 5:45 pm, Gene gene.ress...@gmail.com wrote: Your solution to 1 works fine. I hope you get the job. But it needs O(N) additional storage for the stack. You can also

Re: [algogeeks] aptitude

2011-08-03 Thread vaibhavmittal11
45 km/hr VM NSIT, COE, 3rd year On , Kamakshii Aggarwal kamakshi...@gmail.com wrote: A car is traveling at a uniform speed.The driver sees a milestone showing a 2-digit number. After traveling for an hour the driver sees another milestone with the same digits in reverse order.After another

Re: [algogeeks] aptitude

2011-08-03 Thread Arun Vishwanathan
in general, if u guys get any answer, please post a short explanation even if it the solution is very obvious to u...not everyone gets it when looking at the answer... On Wed, Aug 3, 2011 at 3:34 PM, vaibhavmitta...@gmail.com wrote: 45 km/hr VM NSIT, COE, 3rd year On , Kamakshii Aggarwal

Re: [algogeeks] Re: data type size problem

2011-08-03 Thread Rajesh Kumar
how i gets value 1 3 5 7..even it is initialized by 4294967295. On Wed, Aug 3, 2011 at 6:36 PM, ManishMCS manishdaw...@gmail.com wrote: It is going to infinite because 4294967295 is not equal to 0, so you enters the loop. And in loop, you again increments the value.. So, it print values

Re: [algogeeks] Re: data type size problem

2011-08-03 Thread Arun Vishwanathan
roll over of valuei has an upper limit On Wed, Aug 3, 2011 at 3:39 PM, Rajesh Kumar testalgori...@gmail.comwrote: how i gets value 1 3 5 7..even it is initialized by 4294967295. On Wed, Aug 3, 2011 at 6:36 PM, ManishMCS manishdaw...@gmail.com wrote: It is going to infinite because

Re: [algogeeks] aptitude

2011-08-03 Thread Kamakshii Aggarwal
vaibhav can u please explain.i know the answer already..i m just not able to solve the equations fully On Wed, Aug 3, 2011 at 7:09 PM, Arun Vishwanathan aaron.nar...@gmail.comwrote: in general, if u guys get any answer, please post a short explanation even if it the solution is very obvious to

Re: [algogeeks] Re: data type size problem

2011-08-03 Thread Rajesh Kumar
plz explain what is roll over of value? On Wed, Aug 3, 2011 at 7:11 PM, Arun Vishwanathan aaron.nar...@gmail.comwrote: roll over of valuei has an upper limit On Wed, Aug 3, 2011 at 3:39 PM, Rajesh Kumar testalgori...@gmail.comwrote: how i gets value 1 3 5 7..even it is initialized

Re: [algogeeks] C question.. sizeof operator

2011-08-03 Thread Vivek Ramamoorthy
output ll be 10..sizeof operation just find the size of the variable's datatype..no changes for the variable inside the operation.. -- 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] aptitude

2011-08-03 Thread anubhav gupta
16.. 61 ... 106 ans shld be 45 mile/hr On Wed, Aug 3, 2011 at 7:14 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: vaibhav can u please explain.i know the answer already..i m just not able to solve the equations fully On Wed, Aug 3, 2011 at 7:09 PM, Arun Vishwanathan

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread shady
@puneet that was a joke, i don't think he was serious... anyway please no more mails like this On Wed, Aug 3, 2011 at 6:34 PM, keyan karthi keyankarthi1...@gmail.comwrote: :D :D r u serious dude ?? On 8/3/11, Puneet Gautam puneet.nsi...@gmail.com wrote: @Utkarsh: How did u get the

Re: Re: [algogeeks] aptitude

2011-08-03 Thread vaibhavmittal11
first milestone 16 second milestone 61 third milestone 106 its an observation..ntn like nethn..onli thing i tht ws dat as speed is uniform so distance traveled per hr is constant..so two milestones with reverse numbers wil hv difference as 9x-9y ie multiple of 9..also third milestone wil

[algogeeks] oracle question

2011-08-03 Thread naveen ms
what is the difference b/w system call and library call. -- 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] oracle question

2011-08-03 Thread rajeev bharshetty
@naveen : Library calls inturn call system calls . System calls are basically call to specific functions provided in the kernel which does some predefined activities . Library calls inturn call the system calls of the kernel to achieve a specific job . For example malloc() function is built on top

Re: [algogeeks] oracle question

2011-08-03 Thread saurabh singh
while operating system provides system calls (i,e. system calls are shipped with the kernel) libraries are a higher abstraction to system calls... On Wed, Aug 3, 2011 at 7:27 PM, naveen ms naveenms...@gmail.com wrote: what is the difference b/w system call and library call. -- You

Re: [algogeeks] oracle question

2011-08-03 Thread naveen ms
@rajeev and sourabh:..thanks a lot;...:) -- 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] interview questions

2011-08-03 Thread saurabh singh
sorry I may be wrong, On Wed, Aug 3, 2011 at 7:38 PM, saurabh singh saurab...@gmail.com wrote: use a mapstring,bool... On Wed, Aug 3, 2011 at 5:21 PM, pacific :-) pacific4...@gmail.com wrote: I couldn't find the solution to this problem please help. Find the *first unique* string

Re: [algogeeks] Microsoft Internship

2011-08-03 Thread muthu raj
@saurabh : i got the complete idea. Can u explain how will bit represenation be if a character is repeated 3 times? its set as 1 ryt? *Muthuraj IV th Year , ISE PESIT , Bangalore* On Tue, Aug 2, 2011 at 10:27 PM, saurabh singh saurab...@gmail.com wrote: my hash table was my bitsread

Re: [algogeeks] Re: Goldman sachs

2011-08-03 Thread Ankit Minglani
heyy thanks alot to you people .. it was of so much help :) On Wed, Aug 3, 2011 at 2:49 AM, Kunal Patil kp101...@gmail.com wrote: I agree with Ved that Apti of GS is really really tough and technical is relatively easy..They ask CAT (Quant) like questions and you have to solve them in little

Re: [algogeeks] Malloc()

2011-08-03 Thread muthu raj
Malloc implementation isnt simple as above. It involves system call sbrk() to request memory to operating system and a suitable data structure to allocate and deallocate memory from available memory blocks. Proper implementation of malloc is given in Kerningha ritchie text book :) *Muthuraj R IV

Re: [algogeeks] Microsoft Internship

2011-08-03 Thread saurabh singh
We dont need to worry if its repeated three times or hundred times.We stop bothering once we are confirmed its repeated twice I have posted my working code in a previous post on the same question.Please read my code and let me know wats the problem, On Tue, Aug 2, 2011 at 10:58 PM, muthu raj

Re: Re: [algogeeks] aptitude

2011-08-03 Thread abhishek iyer
(10b+a)-(10a+b)=[(100b+a)or(100a+b)]-(10b+a)... [uniform speed] where a,b are natural numbers less than 10... *1st case* 9(b-a)=90b a=-9b...not acceptable *2nd case* 9(b-a)=99a-9b b-a=11a-b b=6a...acceptable and only value which abides by the condition a,b are natural numbers less than 10

[algogeeks] Algorithm complexity

2011-08-03 Thread Ajai Sathyan
Can u suggest a program with complexity O( log log n ) ? -- 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] Re: MS [Written Question]

2011-08-03 Thread Vengadanathan
It may not work for all , the parameter input is double what happens if the user gives a number greater the range of int datatype , in the return statement during type casting overflow in int occurs and wrong value is returned . check this http://www.ideone.com/oZbCf i have given the input as

Re: Re: [algogeeks] aptitude

2011-08-03 Thread Kamakshii Aggarwal
@abhishek: [(100b+a)or(100a+b)]-(10b+a). how do u know that this no cantains 1 zero?? On Wed, Aug 3, 2011 at 8:03 PM, abhishek iyer abhishekr.iye...@gmail.comwrote: (10b+a)-(10a+b)=[(100b+a)or(100a+b)]-(10b+a)... [uniform speed] where a,b are natural numbers less than 10... *1st case*

Re: [algogeeks] Microsoft Internship

2011-08-03 Thread coder coder
the interviewers are asking easy questions like spiral finding, loop in the list, common ancestor etc.. -- 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] student and company match algo

2011-08-03 Thread MAC
thanks ashish . Can you please share links where this is explained clearly . i am unable to understand the the solutions which i find on google. llike PROPOSE REJECT ALGORITHM: suppoose we had the priorities as stud1:amz-gog-adbe std2:adbe-goog-amz std3:goog-adb-amz and any priorities by

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread DeVaNsH gUpTa
@Admin: Please ban this user from this group. -- 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] Amazon Question

2011-08-03 Thread coder coder
ya amazon will be visiting our campus within few days -- 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: latest google interview questions

2011-08-03 Thread D!leep Gupta
@Admin: yup, Plz ban such type of users from this group. Dileep Kumar Computer Science Engineering -- 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

Re: [algogeeks] [offtopic] Something to share for those preparing for Amazon Campus Interviews!

2011-08-03 Thread coder coder
can anyone tell what kind of aptitude questions they are asking i.e. thier level are they complex lrdi type. also their number -- 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

[algogeeks] Amazon Aptitude questions

2011-08-03 Thread ankit sambyal
1.*What is the wrong in this program *main() { char *p,*q; p=(char *)malloc(25); q=(char*) malloc(25); strcpy(p,amazon ); strcpy(q,hyd); strcat(p,q); printf(%s,p); } 2.*write prefix and post fix notation for (a+b)*c-(d+e)^(f-g) 3.**what is valid in cpp char *cp; const char *cpp; 1) cpp=cp; 2)

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread rahul
Question 1: why output is hello. so printf is buffered function, as everyone knows who use linux/unix, every process open 3 file by default, and these are STDOUT, STDIN, STDERR, internally this program has STDOUT opened, and this hello is given to buffer in kernel thru write system call, and

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread shivendra kumar
@admin pls ban such users from this group. -- 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] Re: latest google interview questions

2011-08-03 Thread sourabh jakhar
@UTKARSH STRICT ACTION WILL BE TAKEN AGAINST U IN COLLEGE FOR SPAMMING THE GROUp On Wed, Aug 3, 2011 at 9:16 PM, rahul rahulr...@gmail.com wrote: Question 1: why output is hello. so printf is buffered function, as everyone knows who use linux/unix, every process open 3 file by default, and

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread Amol Sharma
@devansh,dileep,shivendra : +1 -- Amol Sharma Third Year Student Computer Science and Engineering MNNIT Allahabad On Wed, Aug 3, 2011 at 9:18 PM, shivendra kumar bobbybond...@gmail.comwrote: @admin pls ban such users from this group. -- You received this message because you are

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread rahul
don't be harsh on himevery one is here to learnso please be patience with himhe need to learn a LOT. give me another chance... On Wed, Aug 3, 2011 at 9:18 PM, shivendra kumar bobbybond...@gmail.comwrote: @admin pls ban such users from this group. -- You received this message

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread UTKARSH SRIVASTAV
my id was hacked . i don't know anything.. On Wed, Aug 3, 2011 at 8:49 AM, sourabh jakhar sourabhjak...@gmail.comwrote: @UTKARSH STRICT ACTION WILL BE TAKEN AGAINST U IN COLLEGE FOR SPAMMING THE GROUp On Wed, Aug 3, 2011 at 9:16 PM, rahul rahulr...@gmail.com wrote:

Re: [algogeeks] Amazon Aptitude questions

2011-08-03 Thread annarao kataru
please answer the questions 1 and 4 -- 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

Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread saurabh singh
Abe my id was hacked ka bahana kitti baar banaega? Bas karo yaroon bahut hua.,,,apne group pe aao in log ko baksh do.. *NO MORE POSTS ON THIS TOPIC.* PS:Utkarsh Srivastava is a brilliant coder and algorithimist.see his previous posts(*and an intern at Goldman Sachs*).Its just dat he had

  1   2   3   >