[algogeeks] How

2011-08-30 Thread Anuj kumar
Q)Given a class named Book, which of the following is not a valid constructor? (A) Book ( ) { } (B) Book ( Book b) { } (C) Book ( Book &b) { } (D) Book (char* author, char* title) { } Ans:B how plz give reason.. -- You received this message because you are subscribed to the Google Groups "Alg

[algogeeks] affect of change

2011-08-30 Thread Anuj kumar
Which statement gets affected when i++ is changed to ++i? (A) i = 20; i++; (B) for (i = 0; i<20; i++) { } (C) a = i++; (D) while (i++ = 20) cout

[algogeeks] pls solve ...

2011-08-20 Thread Anuj kumar
Q>Read the following letter-number sequence carefully and answer the question given below: 7 3 P N 4 2 6 3 1 M L B T 4 5 G A C D F J K 1 9 8 2 Q.1) If the first fifteen elements of the above sequence is written in the reverse order which of the following elements will be sixth to the left of twelft

[algogeeks] how o/p is coming

2011-08-11 Thread Anuj kumar
void main() { int a=10,b=20; char x=1,y=0; if(a,b,x,y) { printf("EXAM"); } } o/p XAM how it is coming plz help me,.. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googl

Re: [algogeeks] Re: Directi interview question

2011-08-07 Thread Anuj Kumar
- > 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 mor

[algogeeks] Minimum spanning tree problem

2011-08-07 Thread Anuj Kumar
The link to the problem is http://www.topcoder.com/stat?c=problem_statement&pm=10750&rd=14153 i applied kruskal to find the mst but my code fails for test case 2 *class* node{*public*: *int* start,end,weight;}; *bool* *operator* <(*const* node & first, *const* node & second){ *return* fi

Re: [algogeeks] inorder

2011-08-06 Thread Anuj Kumar
c; > ptr=root; > > while(ptr->info!=x->info) > { > > if(x->infoinfo) > { > psuc=ptr; > ptr=ptr->left; > } > > else > ptr=ptr->right; > } > > > return psuc; > } > > On 8/6/11, Anuj Kumar wrote: > > i am sending the run

Re: [algogeeks] Re: Directi on campus

2011-08-06 Thread Anuj Kumar
>> > -- > 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] inorder

2011-08-06 Thread Anuj Kumar
ps.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. > -- Anuj Kumar Third Year Undergraduate, Dept. of Computer Science and Engineering NIT Durgapur

Re: [algogeeks] Re: Microsoft :)

2011-08-06 Thread Anuj Kumar
d 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 > http://groups.google.com

Re: [algogeeks] help with stringstream (STL)

2011-08-03 Thread Anuj Kumar
his group at > http://groups.google.com/group/algogeeks?hl=en. > -- Anuj Kumar Third Year Undergraduate, Dept. of Computer Science and Engineering NIT Durgapur -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this

[algogeeks] what wil be o/p

2011-08-02 Thread Anuj kumar
#include #include int main() { int arr[5]; printf("%d %d\n",sizeof(arr),sizeof(&arr)); getch(); return 0; } o/p 204 anybody can tell me how 20 is coming plzz -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this gro

[algogeeks] what will be size??

2011-08-02 Thread Anuj kumar
#include #include int main() { char a[]="sunstroke"; char *p="coldwave"; printf("%d",sizeof(a)); printf("\n"); printf("%d",sizeof(p)); getch(); return 0; } output 10 4 how 10 is coming??? -- You received this message because you are subscribed to the Google Group

[algogeeks] detects the language of the strings and converts it to English

2011-07-30 Thread Anuj kumar
Hi frnds.. Any one can help me in this Application ..Its Urgent Plzz. Q>Create a web application using any technology that accepts a set of strings, detects the language of the strings and converts it to English. You may use Google translation API. -- You received this message because you are sub

[algogeeks] MD5

2011-07-18 Thread Anuj kumar
some body can give me code of MD5 PLZ its Urgent .. -- 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...@goo

[algogeeks] MD5

2011-07-18 Thread Anuj kumar
some body can give me code of MD5 PLZ its Urgent .. -- 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...@goo

[algogeeks] XOR Rounds

2011-01-04 Thread Anuj Kumar
http://www.codechef.com/problems/RESN02/ someone please tell me how to approach this problem -- Anuj Kumar Third Year Undergraduate, Dept. of Computer Science and Engineering NIT Durgapur -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks"

Re: [algogeeks] Re: Implement a queue in which push_rear(), pop_front() and get_min() are all constant time operations.

2011-01-02 Thread Anuj Kumar
group, send email to algoge...@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. > -- Anuj Kumar Third Year Undergraduate, Dept. of

Re: [algogeeks] Re: Float Comparison

2011-01-01 Thread Anuj Kumar
we use epsilon in that case as the float values are not exact there is an approximation. On 1/2/11, Anuj Kumar wrote: > he means == > > On 1/2/11, Dave wrote: >> @Saunsh: Why do you say that we cannot use < or > on floats? Of course >> we can! >> >> Dave

Re: [algogeeks] Re: Float Comparison

2011-01-01 Thread Anuj Kumar
om this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Anuj Kumar Third Year Undergraduate, Dept. of Computer Science and Engineering NIT Durgapur -- You received this m

Re: [algogeeks] puzzle

2010-12-31 Thread Anuj Kumar
this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Anuj Kumar Third Year Undergraduate, Dept. of Computer Science and Engineering NIT Durgapur -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to thi

Re: [algogeeks] Re: HP Question

2010-12-21 Thread Anuj Kumar
For more options, visit this group at >> >http://groups.google.com/group/algogeeks?hl=en. >> >> -- >> bhupendra dubey > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this

[algogeeks] qsort

2010-12-08 Thread ANUJ KUMAR
how can i use qsort a structure. please give me the code if possibe -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsu

[algogeeks] please explain the output

2010-11-05 Thread ANUJ KUMAR
#include int main() { printf("anuj","kumar"); return 0; } -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this g

Re: [algogeeks] Re: Frequent values spoj

2010-10-21 Thread ANUJ KUMAR
please give me its output file also so that i can check mine On 10/21/10, ANUJ KUMAR wrote: > thanks > > On 10/21/10, juver++ wrote: >> Please have a look at this page: >> http://www.informatik.uni-ulm.de/acm/Locals/2007/input/. >> It contains input data for the prob

Re: [algogeeks] Re: Frequent values spoj

2010-10-21 Thread ANUJ KUMAR
thanks On 10/21/10, juver++ wrote: > Please have a look at this page: > http://www.informatik.uni-ulm.de/acm/Locals/2007/input/. > It contains input data for the problem. > > On 21 окт, 00:39, ANUJ KUMAR wrote: >> i am getting wa forhttps://www.spoj.pl/problems/FREQUENT/

[algogeeks] Frequent values spoj

2010-10-20 Thread ANUJ KUMAR
i am getting wa for https://www.spoj.pl/problems/FREQUENT/ here is my code i have used segment trees it would be great if someone could give me a test case for which my code gives wa. Thanks in advance. #include #include #include #include #include #include using namespa

[algogeeks] Bee Maja spoj

2010-10-12 Thread ANUJ KUMAR
i am getting wa for http://www.spoj.pl/problems/BMJ/ My logic is that i have seen that the numbers in Willi's Coordinate System vertically downwards from 1 are following a pattern and i have stored that pattern in array ar and the index of the array for each value of Willi's Coordinate System is t

[algogeeks] MAX size of an array

2010-10-12 Thread ANUJ KUMAR
what is the maximum size an array can have in spoj in c++? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@g

Re: [algogeeks] sorted array

2010-10-12 Thread ANUJ KUMAR
56 On Tue, Oct 12, 2010 at 5:09 PM, divya wrote: > Given a sorted array A with 8 integers.We want to have 2 sorted arrays > B(with 5 integers) > And C(with 3 integers) such that merging B and C would result in A. > How many such pairs exists > > -- > You received this message because you are subs

[algogeeks] kmp

2010-09-17 Thread ANUJ KUMAR
Please explain me how to implement kmp in 2d pattern matching 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 algoge...@googlegroups.com. To unsubscribe from this group, send email to a

[algogeeks] sorting

2010-06-28 Thread ANUJ KUMAR
Which is a better measure for sorting 1)no of elements on their rank position 2)longest increasing subsequence -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe fro

Re: [algogeeks] linked list

2010-06-22 Thread ANUJ KUMAR
reverse one of the linked lists in O(n) time and then see if the resulting one is same as the other one On Wed, Jun 23, 2010 at 1:56 AM, divya wrote: > Two link lists are given ...check if one is reverse of other. Do it > without using extra space. > > -- > You received this message because you a

[algogeeks] compressed trie

2010-06-22 Thread ANUJ KUMAR
Please send me a c++ code for a compressed trie. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroup

Re: [algogeeks] 23 candies among 7 kids

2010-06-22 Thread ANUJ KUMAR
(2^7-1)^23 On Tue, Jun 22, 2010 at 8:22 PM, Aarthi Thangamani wrote: > Given 23 chocolates and there are 7 kids. How many ways are there to spilt > the chocolates among the 7 kids? All of the chocolates must be distributed > and it can happen that some kids do not get any. > > For example: first

[algogeeks] knapsack

2010-06-21 Thread ANUJ KUMAR
How can i maintain the list of objects selected in the knapsack problem. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks

[algogeeks] Re: knapsack

2010-06-21 Thread ANUJ KUMAR
=tt-ar[x].value; } } if(knap[0][tt]>0) ans.push_back(ar[0].index); On Tue, Jun 22, 2010 at 7:47 AM, ANUJ KUMAR wrote: > How can i maintain the list of objects selected in the knapsack problem. > -- You received this message because you are subscribed t

Re: [algogeeks] Towers of hanoi

2010-06-17 Thread ANUJ KUMAR
i am not getting what to do when we get a different bit from the previous one someone please explain On Mon, Jun 14, 2010 at 9:14 AM, Anurag Sharma wrote: > Use iterative version :http://en.wikipedia.org/wiki/Tower_of_Hanoi > > Anurag Sharma > > On Mon, Jun 14, 2010 at 12:36

[algogeeks] towers of hanoi

2010-06-17 Thread ANUJ KUMAR
please post the solution to http://www.spoj.pl/problems/HAN01/ -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr.

Re: [algogeeks] towers of hanoi O(1) time

2010-06-16 Thread ANUJ KUMAR
please explain what happens when we get a different bit from the previous one. On Wed, Jun 16, 2010 at 4:53 PM, ANUJ KUMAR wrote: > I am not getting how you place a move when you get a bit that is > different from previous one > > > # A bit with a different value to the previous

Re: [algogeeks] towers of hanoi O(1) time

2010-06-16 Thread ANUJ KUMAR
he same peg as their first greater disk=2 now the largest disk is on peg = 2 which is not the left peg so n comes out to be 2 while its given on wiki that ". Since n is odd(n=3), it is one peg to the right, i.e. on the left peg." please help Thanks&Regards Anuj Kumar On Tue,

[algogeeks] towers of hanoi O(1) time

2010-06-15 Thread ANUJ KUMAR
how can we print the reconstructed configuration of the towers after k steps in towers of hanoi problem in O(1) time. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscr

[algogeeks] Towers of hanoi

2010-06-13 Thread ANUJ KUMAR
http://www.spoj.pl/problems/HAN01/ i implemented it using stack but am getting tle someone please help -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this g

Re: [algogeeks]

2010-04-01 Thread ANUJ KUMAR
for a particular query it will be O(log n+k).Where k is the no. of elements to be reported. On Wed, Mar 31, 2010 at 11:54 PM, BlackdiamonD wrote: > Binary Indexed Trees or Segment Interval trees.  building them also it will > take O(n log(n)) > ..i feel for a particular query it will be difficult

Re: [algogeeks]

2010-03-31 Thread ANUJ KUMAR
We can make a query tree and then each query will take O(log n+k) time. On Wed, Mar 31, 2010 at 12:48 PM, Anil Kishore wrote: > What do you mean by points ? .. Are you referring to the integer values > stored ? > . > 1.) If the question is, given N integers.. and given x1 and x2, report all > int