Re: [algogeeks] NIT Kurukshetra presents Online programming contest- ENCODER

2012-02-22 Thread Mohit Goel
check it now ... register your team and engage in codewar .. -- 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] os

2011-09-07 Thread Mohit Goel
How many processes are created in this snippet? Main() { Fork(); Fork() fork () || fork (); Fork (); } -- 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] os

2011-09-07 Thread Mohit Goel
a. 15 b. 19 c. 21 d. 27 e. 31 these are the only options. -- 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] os

2011-09-07 Thread Mohit Goel
20 is not in option ..so whats the answer?? -- 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] os

2011-09-07 Thread Mohit Goel
thnks everyone... -- 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

[algogeeks] explain the output..!!

2011-09-05 Thread Mohit Goel
1) #include stdio.h #include stdlib.h #define SIZEOF(arr) (sizeof(arr)/sizeof(arr[0])) #define PrintInt(expr) printf(%s:%d\n,#expr,(expr)) int main () { /* The powers of 10 */ int pot[] = { 0001,0010,0100,1000 }; int i;

Re: [algogeeks] explain the output..!!

2011-09-05 Thread Mohit Goel
got it ..!! thnks everyone -- 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

[algogeeks] determine error..!!

2011-09-05 Thread Mohit Goel
1) #include stdio.h #define PrintInt(expr) printf(%s : %d\n,#expr,(expr)) int max(int x, int y) { (x y) ? return x : return y; } int main () { int a = 10, b = 20; PrintInt(a); PrintInt(b); PrintInt(max(a,b)); } 2#include stdio.h void

Re: [algogeeks] Re: Given an array A[] and a integer num. Find four no.s in the array whose sum is equal to given num.

2011-08-28 Thread Mohit Goel
This code may also work .give any counter examples... #includeiostream using namespace std; void find_sum(int num,int k,int j,int b); void display(int i,int j); #define MAX 8 int res[4]; //array to store 4 numbers.. int arr[MAX]

[algogeeks] how to find K most significant digit of a number..???

2011-08-13 Thread Mohit Goel
-- 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

Re: [algogeeks] Adobe Interview Question

2011-08-13 Thread Mohit Goel
there are 5 possibilities ..5th one is_12_..other as specified by ankit... t(1) =2 (it can directly jump to anathor bank) t(2) =3 ( _2_,_1_,_12_) t(3) =5... thats how fibonnaci goes on plz correct if wrong... -- You received this message because you are subscribed to the Google

Re: [algogeeks] Re: Microsoft written!!!

2011-08-10 Thread Mohit Goel
10 4 5 2 7 6 11 1 39 8 12 13 14 15 i think we should first find the parent of the particular node ..then apply the concept as told by Brijesh on it p =parent(q); r = parent(p);

Re: [algogeeks] Re: Microsoft written!!!

2011-08-10 Thread Mohit Goel
@muthu raj: it will also come out ,when loop condition will not be statisfied.i.e when 'p' is not the right child of its parent...in such a case it will not reach root .. in the ex given by u it will stop at 4 . -- You received this message because you are subscribed to the Google Groups

[algogeeks] c doubt

2011-08-08 Thread Mohit Goel
#includestdio.h #includeconio.h struct abc { char p[1]; }; int main() { struct abc *c =NULL; char name[]=abcde; c = (struct abc *) malloc (sizeof(struct abc)); strcpy(c-p,name); printf(%s,c-p); getch(); return 0; } why it is printing the whole string

[algogeeks] C++ heap vs stack

2011-08-08 Thread Mohit Goel
In c++ we should allocate the memory for the object on the stack or on the heap? what effect it will have on the program . -- 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

Re: [algogeeks] C++ heap vs stack

2011-08-08 Thread Mohit Goel
what the reason behind it how do they differ in functonality..? -- 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] MICROSOFT INTERVIEW QUESTIONS faced by my frenz nd me

2011-08-07 Thread Mohit Goel
can anyone one explain output of question 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 group, send email to

[algogeeks] CAMPUS VISIT..

2011-08-03 Thread Mohit Goel
hey guys does anyone know about WINSHUTTLE...its coming to ur campus... -- 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] finding element in rotated array

2011-07-30 Thread Mohit Goel
yes ..u r right ...thnks... -- 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

[algogeeks] finding element in rotated array

2011-07-29 Thread Mohit Goel
Given a sorted array of n integers that has been rotated an unknown number of times, give an O(log n) algorithm that finds an element in the array You may assume that the array was originally sorted in increasing order EXAMPLE:

Re: [algogeeks] finding element in rotated array

2011-07-29 Thread Mohit Goel
but this works ,if array is rotated multiple times ,around different pivots. -- 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: help..

2011-07-02 Thread mohit goel
May be this can work.give any counter example... int count; main() { int l,rope,cuts; scanf(%d%d,l,rope); count =0; find_cuts(l,rope); printf(cuts needed is %d,count); getch(); return 0; } int find_cuts(int l,int rope) {