[algogeeks] Interns Required

2017-11-16 Thread Prateek Gupta
details : - Duration available for work. - College and Branch. -- Prateek Gupta MNNIT Allahabad. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[algogeeks] Rocket Fuel

2015-01-17 Thread Prateek Khandelwal
Hey all Is anyone ever get interviewed in Rocket Fuel ? Can someone please tell what type of questions they have asked ? Thanks Prateek -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails

Re: [algogeeks] Re: Comparing string of unequal length

2014-10-07 Thread Prateek Khandelwal
I think this question can be done in O((m-n)*n) where m is the length of larger string and n is the length of smaller string Prateek Khandelwal Software Engineer in Directi +91-7042393719 On Tue, Oct 7, 2014 at 6:06 PM, vikas vikas.rastogi2...@gmail.com wrote: question unclear ?What

Re: [algogeeks] Re: Comparing string of unequal length

2014-10-07 Thread Prateek Khandelwal
Just think in this manner that put 0 star in front, then 1 star in front and so on and while doing this just compare both the strings. If you are not able to understand just tell me I will mail my code to you. Prateek Khandelwal Software Engineer in Directi +91-7042393719 On Tue, Oct 7, 2014

Re: [algogeeks] Google Interview Question: In how many intervals does a number exists

2013-06-09 Thread Prateek Jain
2-2 as 2 lies in [2,3] and [1,4] ? On Sun, Jun 9, 2013 at 12:50 PM, Monish Gupta monish.gup...@gmail.comwrote: There are n Intervals. Given a set of m numbers, tell in how many intervals does each number exists. Example: 4 Intervals: [2,3] [3,4] [1,4] [3,10]. Numbers {2,4,11} For 2 - 1 as 2

Re: [algogeeks] stack. Mid element in o(1)

2013-05-23 Thread Prateek Jain
I think there is no need for such a complex code. use length() method to get the size of the stack and return the middle element i.e. m=S.length() if(m is even) return arr[m/2] else return arr[m+1/2] it can be done in O(const) time On Thu, May 23, 2013 at 12:54 PM, Avi Dullu

Re: [algogeeks] VIDEO STREAMING

2012-11-23 Thread Prateek Gupta
@kartik +1:P :P PS : pardon the pun. On Sat, Nov 24, 2012 at 11:42 AM, Kartik Sachan kartik.sac...@gmail.comwrote: hey anybody has any idea about video streaming using vlcj lib ?? -- *WITH REGARDS, *KARTIK SACHAN B.Tech. Final Year Computer Science And Engineering Motilal

[algogeeks] Re: Question asked in Amazon online test

2012-06-29 Thread Prateek Khurana
Hi, This one is quite easy. You have to calculate the number of one's before every zero and add them up. That's it. public class Test1 { public void printArray(int[] tmpArr) { for (int i : tmpArr) { System.out.println(i); } } public int calculateMinSwaps(int[] tmpArr) { int minSwaps = 0; int

Re: [algogeeks] Question asked in Tachyon interview

2012-06-26 Thread Prateek Jain
main(a,b,m) 02{ 03while (~scanf(%d%d,a,b)) 04{ 05 m=0; 06 while (a) 07 { 08if (a1) 09 m+=b; 10a=1; 11b=1; 12 } 13 printf(%d\n,m); 14} 15} -- You received this message

Re: [algogeeks] problem with increment operator

2012-05-30 Thread Prateek Jain
yups...it is compiler dependent...but a logic is necessary to get it... -- 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] problem with increment operator

2012-05-30 Thread Prateek Jain
okk -- 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] The following problem is a variation of Tower of hanoi problem...Plz suggest on how to approach the following problem...

2012-05-30 Thread Prateek Jain
built a tree (not binary) where the root node is the initial configuration of pegs. For each possibility of movement of the initial configuration of disks, a child node is created. Thus, for each child node created, I check if the current configuration is the final configuration. If yes, problem

Re: [algogeeks] problem with increment operator

2012-05-29 Thread Prateek Jain
how is it 6? ++a(5) + ++a(6) + a++(6) it shud be 17 -- 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] Direct-I second round telephonic interview

2012-04-11 Thread Prateek Khandelwal
He asked me about my *projects* and technical background. So you should know everything related to your projects. * Now my interview questions...* 1. What is the difference between *hasmap*, *bst* and *trie* ??? 2. Compare *mergesort* and *quicksort* why in sort function of vectors randomized

Re: [algogeeks] probability of winning with two cards

2012-01-18 Thread Prateek Jain
ya obviously...it is 1/3.no need of any data is required On 1/18/12, sunny agrawal sunny816.i...@gmail.com wrote: isn't the answer will be 1/3, without any calculations :) On Thu, Jan 19, 2012 at 7:10 AM, Sundi sundi...@gmail.com wrote: there are 52 cards.. there are 3 players a1,a2,a3

Re: [algogeeks] Re: which is better?

2011-09-22 Thread Prateek Jain
depends on the requirement of the code... On Thu, Sep 22, 2011 at 11:00 AM, DIPANKAR DUTTA dutta.dipanka...@gmail.com wrote: Depends on compiler architecture , and how they use instruction set architecture ( Increment Op) of underlining machine On Thu, Sep 22, 2011 at 7:21 AM, Don

Re: [algogeeks] Find the output

2011-09-16 Thread Prateek Jain
Brijesh is right.until u do the type casting it will show an error On Fri, Sep 16, 2011 at 5:57 AM, Pradip Singh qnit...@gmail.com wrote: it will print 2,5 On Fri, Sep 16, 2011 at 2:35 AM, Brijesh brijeshupadhyay...@gmail.comwrote: On Friday, 16 September 2011 13:25:38 UTC+5:30,

Re: [algogeeks] C output

2011-09-14 Thread PRATEEK VERMA
9 and 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 more options, visit this group

Re: [algogeeks] Re: whats d problem wid using gets?

2011-09-08 Thread PRATEEK VERMA
@harshit it is also possible with scanf(%[^\n]s) for multi word input -- 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] plz xplain the o/p

2011-09-07 Thread PRATEEK VERMA
@piyush the output will hello piyushit's due to following reason you've declared array of 2 pointers to character(char *pstr[2]),which means hello and piyush are stored somewhere else but your array is having only starting addresses of each string.now when you are calling swap

Re: [algogeeks] c doubt

2011-08-31 Thread PRATEEK VERMA
oh i'm sorry guys galz,its my mistake..actually i forgot to add one more field in struct this is the correct one typedef struct { int bit1:29; int bit2:4; }bit; int main() { printf(%d\n,sizeof(bit)); return 0; } now what will be the output...i'm sure you will amazed to see the result

Re: [algogeeks] convert a string into another in minimum number of steps

2011-08-30 Thread PRATEEK VERMA
Anup has proposed good solution.use edit distance algorithm and make matrix for insertion and deletion operation. Last entry of the matrix will give the solution which says about minimum possible operation to convert one string to other. -- You received this message because you are

Re: [algogeeks] c doubt

2011-08-30 Thread PRATEEK VERMA
@kartik it's wrong output...output will be 8 bytes.I asked this question just to give more clear picture of bit field -- 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] Re: How to save a binary search tree space efficiently

2011-08-30 Thread PRATEEK VERMA
level order traversal can be a solution but since it is BST that we want to store not binary tree(we can store binary tree using level order trav and can reconstruct tree out of it) so we can just store the preorder traversal, at time of reconstructing,scan through this traversal and pass the

Re: [algogeeks] Explanation

2011-08-29 Thread PRATEEK VERMA
#define g(a) #a replaces any occurrence of g(a) with string a. #define f(a,b) a##b replaces any occurrence of f(a,b) with concatenation of a and b -- 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] Re: How to save a binary search tree space efficiently

2011-08-29 Thread PRATEEK VERMA
@prashant it is the same mid value as u calculate in binary search i.e. (lowest index+highest index)/2 No matter whether it is 18 or 27,u gonna get almost balanced BST every time if u do construct the tree as ankit has mentioned. -- You received this message because you are subscribed to the

Re: [algogeeks] c program explain

2011-08-28 Thread PRATEEK VERMA
for(i=0;i16;i++) printf(%d\n,(numi115)? 1:0); consider the above code snippethere at each iteration num is being left shifted,and it is being ANDed with 1000 same at d time. here it is assumed that system is of 16 bit that's why loop is for 16 iterations. it's better to work wid

Re: [algogeeks] Class Doubt

2011-08-28 Thread PRATEEK VERMA
in c++,classes have some by default feature like they have default constructor,copy constructor and overloaded =operator by default -- 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 doubt

2011-08-28 Thread PRATEEK VERMA
int bit1:1; above definition instructs compiler that use 1 bit for storing integer(signed by default) in bit1. Such notation is used for optimization of memory use. So if someone stores 1 in bit1 then,it will be treated as -1 by compiler since we have instructed the compiler to store it in one

[algogeeks] Re: Class Doubt

2011-08-28 Thread prateek gupta
In c++ we have default copy constructor ,which is called when we use statement like e2=e;ie when object are of same class type. On Aug 28, 3:29 pm, ravi maggon maggonr...@gmail.com wrote: Hi Can you explain the below mentioned code. As far as I know we need to overload = operator in order to

Re: [algogeeks] elitmus test

2011-08-25 Thread prateek gupta
prepare well for di, quant and va are easy but di is really hard. 1 ques that often appears in their test is ABC * EFG - 7JK L4N PQR --- --- some conditions will be given and you have to find which number does

[algogeeks] Re: regarding amdocs interview questions

2011-08-16 Thread prateek gupta
@abhishek yes i am appearing through offcampus drive.plz tell me regarding sql and unix preparation as i belong to ECE and don't have good knowledge of these subjects. On Aug 16, 1:29 pm, abhishek abhishekgupta0...@gmail.com wrote: @ prateek r u appearing offcampus??? from which college u r

[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

Re: [algogeeks] string easy question

2011-08-02 Thread prateek gupta
. -- Prateek Gupta 7th sem, Information Technology, Netaji Subhas Institute Of Technology Delhi. -- 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

Re: [algogeeks] Re: MS c output ques

2011-08-01 Thread prateek gupta
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. -- Prateek Gupta 7th sem, Information Technology, Netaji Subhas

Re: [algogeeks] Any help on bits?

2011-07-31 Thread prateek gupta
/algogeeks?hl=en. -- Prateek Gupta 7th sem, Information Technology, Netaji Subhas Institute Of Technology Delhi. -- 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

[algogeeks] puzzle

2011-07-31 Thread prateek gupta
Can anyone plz tell me 1. how to get a fair result from a unfair coin? 2. How to use a fair coin to get unfair result? -- Prateek Gupta -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks

[algogeeks] quick sort query

2011-07-27 Thread prateek gupta
void quicksort( T[] A, Integer left, Integer right) if ( left right ) q = partition( A, left, right) ; quicksort ( A, left, q–1); quicksort ( A, q+1, right) ; Integer partition( T[] A, Integer left, Integer right) m = left + right / 2; swap( A[left], A[m]); pivot = A[left] ; lo =

[algogeeks] string matching

2011-06-22 Thread prateek gupta
In naive string matching how can the knowledge abt. pattern that it has all different characters can be used to accelerate the algorithm to O(n) . -- 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] string matching

2011-06-22 Thread prateek gupta
, 2011 at 11:19 AM, Piyush Sinha ecstasy.piy...@gmail.comwrote: Read KMP algorithm.. On Thu, Jun 23, 2011 at 11:17 AM, prateek gupta prateek00...@gmail.comwrote: In naive string matching how can the knowledge abt. pattern that it has all different characters can be used to accelerate

Re: [algogeeks] is it correct??

2011-06-14 Thread prateek gupta
no the no of elements in an array should be known to compiler before execution of the program. On Tue, Jun 14, 2011 at 8:09 PM, amit amitthecoo...@gmail.com wrote: is such a declaration correct: cinx; int a[x]; -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] help

2011-06-13 Thread prateek gupta
the expression involving and and or operator is evaluated from left to right uptill the point from where the value of the expression can be determined. On Mon, Jun 13, 2011 at 6:17 PM, Shachindra A C sachindr...@gmail.comwrote: || and operators are called short circuit operators and need not

Re: [algogeeks] Re: find error

2011-06-12 Thread prateek gupta
its working in dev-cpp. On Sun, Jun 12, 2011 at 10:40 AM, Balaji S balaji.ceg...@gmail.com wrote: no error ryt?? -- 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] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-05-04 Thread Prateek
Hey Rajeev, Can you mail me the pdf of the book. My email is mailtoprat...@gmail.com. The google doc isnt opening. It is giving an error - Sorry, we are unable to retrieve the document for viewing or you don't have permission to view the document.. Thanx in advance. -- Prateek On Apr 14, 9:29

Re: [algogeeks] c aps

2011-01-09 Thread Prateek Jain
the printf function returns 1 when it prints a string.. for (1;1i--;1) { printf(bat); } note that i=2 has been cunningly initialized before. and the decrement of i has been done in middle expression of the for loop hence, actually its like for(;i--;) { } how many times will this execute?

[algogeeks] Re: Interview question: can this be done?

2006-02-16 Thread Prateek
multiple instances will be reduced to some extent.. Regards, Prateek. --~--~-~--~~~---~--~~ 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

[algogeeks] Re: Interview question: can this be done?

2006-02-14 Thread Prateek
I think a better alternative could be to choose EVEN 5000 numbers (taking mod of 2 of any number out of these can help to check whether it can be in the set or not) and then make out set of 200 from these 5000 even numbers.. the set of 200 nos can be written on the disk in a sorted manner so