[algogeeks] Opening with a startup : Ezetap

2015-08-18 Thread Bhavesh agrawal
Hi All, Hope you guys are doing good. This is regarding openings that we have with Ezetap for Java developers. Although the language is necessity but they are looking for someone who passionate about writing things from scratch. If anyone is interested, do send your resume to me. Thanks and

Re: [algogeeks] SPOJ problem : CANDY

2012-06-21 Thread Bhavesh agrawal
in this prob also for i=0, i to k read cand rem=(rem+cand)%k if (rem) then no else 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@googlegroups.com. To unsubscribe from this group, send

Re: [algogeeks] SPOJ problem : CANDY

2012-06-21 Thread Bhavesh agrawal
i think you should try to give output for each test case rather to use any temp array -- 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] SPOJ problem : CANDY

2012-06-20 Thread Bhavesh agrawal
long long not require in this que . try it again.. -- 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] SPOJ problem : CANDY

2012-06-20 Thread Bhavesh agrawal
here is my code u can check that.. http://ideone.com/Gii1d -- 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] 4Sum

2012-06-17 Thread Bhavesh agrawal
@jalag: in amol's solution binary search will take log(n^3) bcz size of sum array is n^3 not it will take n^3*logn . -- 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] Bhavesh agrawal wants to chat

2012-06-02 Thread Bhavesh agrawal
I've been using Google Talk and thought you might like to try it out. We can use it to call each other for free over the internet. Here's an invitation to download Google Talk. Give it a try! --- Bhavesh agrawal wants to stay

Re: [algogeeks] Re: whats a CALL BACK in C?

2012-05-31 Thread Bhavesh agrawal
Here is an example of callbacks in C. Let's say you want to write some code that allows registering callbacks to be called when some event occurs. First define the type of function used for the callback: typedef void (*event_cb_t)(const struct event *evt, void *userdata); Now, define a function

[algogeeks]

2012-02-08 Thread Bhavesh agrawal
Question: You are given 100 stations and distance between each adjacent stations. Now you have to select 10 stations(means 10 hops) among those 100 stations in such a way that maximum of distance between any 2 hops will be minimised. By default 1 and 100 stations are selected , so you need to

Re: [algogeeks]

2011-11-27 Thread Bhavesh agrawal
down vote You can, this is the pseudo algorithm: max = 2max = SMALLEST_INT_VALUE; for element in v: if element max: 2max = max; max = element; else if element 2max: 2max = element; 2max is the value you are looking for. -- You received this message because you

Re: [algogeeks] Re: c output

2011-09-19 Thread Bhavesh agrawal
abhishek can you plz explain -- 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] c output

2011-09-18 Thread Bhavesh agrawal
#includestdio.h main() { int a ; a=abc(); printf(\n %d this is fisrt a:,a); a=abc(); printf(\n %d this is second a:,a); } int abc() { int i=23; if(10) return ; i++; return(++ i); } -- You received this message because you are subscribed

Re: [algogeeks] c output

2011-09-18 Thread Bhavesh agrawal
result is this -1075990972 this is fisrt a: 30 this is second a what is the meaning of a=30 in second 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

Re: [algogeeks] c output

2011-09-18 Thread Bhavesh agrawal
another que.. #includestdio.h main() { int a; int i=10; printf(%d %d %d\n,i+++i,i,i---i); printf(%d\n,i---i); a=i---i; printf(%d \n%d,a,i); return 0; } output: 18 10 0 0 0 8 how ?? -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks]

2011-09-14 Thread Bhavesh agrawal
1) sort each array O(n lg(n)) 2) for(i=0;istrlen(array1);i++) for(j=0;jstrlen(array2);j++) { req= -(a[i]+b[j]); binsearch(c, req) //req element can be found out by using binary search in third array } hence O(n*n*lg(n)) -- You received this

Re: [algogeeks]

2011-07-22 Thread Bhavesh agrawal
double pointer mean like **p hoe to allocate memory for this -- 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: O(n) Time is the problem. ..

2011-06-27 Thread Bhavesh agrawal
can anyone plz post the code for this problem -- 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: puzzle

2011-06-27 Thread Bhavesh agrawal
only ONE mouse ...consume each sample of bottles of bear with a difference of one hour and calculate time.. sry if is thr any stupidity in this answer..but i think it may be right -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Re: puzzle

2011-06-27 Thread Bhavesh agrawal
ok , yeah 3 is the correct 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 algogeeks+unsubscr...@googlegroups.com. For

[algogeeks] PUZZLE

2011-06-27 Thread Bhavesh agrawal
All the nine digits are arranged here so as to form four square numbers: 9 81 324 576 How would you put them together so as to form single smallest possible square number and a single largest possible square number.. 139854276 and 923187456 are the answers given

Re: [algogeeks] c query

2011-06-23 Thread Bhavesh agrawal
i got (null) 0.0 on my gcc compiler , is there any syntax error -- 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: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-06-23 Thread Bhavesh agrawal
mail it to me plz.. agr.bhav...@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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com.

[algogeeks] output

2011-06-14 Thread Bhavesh agrawal
int a,c=5; a=c++ + ++c + c++ + ++c; printf(%d\n,a); c=5; a=c++ + ++c + c++; printf(%d\n,a); c=5; a=++c + ++c; printf(%d\n,a); c=5; a=++c + ++c + ++c; printf(%d\n,a); compiled with gcc and the outputs are 25 18 14 22 can anyone plz explain these outputs -- You received this message because you

Re: [algogeeks] repeted element

2011-06-08 Thread Bhavesh agrawal
may be by using B+ tree it can be solved within O(n) time. checking conditions at the making of tree if index already present or element pointer-1 and pointer+1 positions can be checked . -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] [brain teaser ] Trolls Riddle 31 may

2011-05-31 Thread Bhavesh agrawal
2 cakes.. is there any condition remains? -- 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] Google Interview Question

2011-05-30 Thread Bhavesh agrawal
solution may be array ={ 3 ,21 ,9 ,93,17 ,178 ,1,101} (i think i have covered all exceptions ) then ,change this array like 3 , 21222, 9, 93999, 17111, 17811, 1 , 10111 ( make each number of 5 digit with rest digits same as Ist digit ) then sort this array 9, 93999,3

Re: [algogeeks] Google Interview Question

2011-05-30 Thread Bhavesh agrawal
@piyush : hey buddy, check out carefully i think you missed something. my solution says it's 18 -18111 187-18711 and i think you will count it carefully... plz let me know in any case if my solution goes wrong anywhere . -- You received this message because

[algogeeks] output

2011-05-27 Thread Bhavesh agrawal
#include stdio.h /* copy input to output; 2nd version */ main() { int c; while ((c = getchar()) != EOF printf(%d\n,c)) {putchar(c); printf(\n);} } it's output is like a 97 a 10 b 98 b 10 i dont understand the meaning of 10 here -- You received this message because you are subscribed to the

Re: [algogeeks] PUZZLE

2011-05-21 Thread Bhavesh agrawal
everyone ,plz post some solution or 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, send email to

Re: [algogeeks] Re: FUN TEASER 11 may

2011-05-21 Thread Bhavesh agrawal
if i am in saraswati river then it will be ok as water level is hard to swim -- 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] PUZZLE

2011-05-20 Thread Bhavesh agrawal
1 elephant can take 1000 banana at a time and eat 1 banana after each 1km travel. total bananas are 3000 and distance have to travel from A to B is 1000km. So how many max bananas he can take from A to B. (he'll eat in return travel too) -- You received this message because you are

Re: [algogeeks] [brain teaser ] Greater than God Riddle 18 may

2011-05-18 Thread Bhavesh agrawal
nice 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 algogeeks+unsubscr...@googlegroups.com. For more options, visit this

Re: [algogeeks] Google Q

2011-05-13 Thread Bhavesh agrawal
This problem can be solved using 2 heaps and the median can always be accessed in O(1) time ,the first node. -- 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

[algogeeks] Bhavesh agrawal wants to chat

2011-03-12 Thread Bhavesh agrawal
--- Bhavesh agrawal 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-b4f0875ca2-29d66a53f9-Tt0nFfpQ80JaH-2cWOceg6RZIxQ

Re: [algogeeks] Re: printing without loop

2011-03-05 Thread Bhavesh agrawal
funny but correct ,i have a code of 100 lines of file named b.cpp so i use awk script to print only no. of lines and i got the exact desired result . #includecstdlib using namespace std; int main() { system(awk '{print NR}' b.cpp); } -- You received this message because you are subscribed

[algogeeks] SPOJ PROBLEM

2011-02-02 Thread Bhavesh agrawal
Do you ever thought about biggest number that you can write ? For a kid,the biggest number that he/she could write is 10 or 100 or 1000 etc and this depends on solely on his/her teacher. We are not kids and we also have a computer for our help so we can think of much big number,for example

Re: [algogeeks] Re: codechef problem

2011-02-02 Thread Bhavesh agrawal
if we just use hashing to store the different slope values On Wed, Feb 2, 2011 at 7:45 PM, bittu shashank7andr...@gmail.com wrote: @above Use Simple Mathematics What is collinear Point...?? what is condition of collinearity..?? thats it You have done Three or more points P1, P2, P3,

Re: [algogeeks] Re: SPOJ PROBLEM

2011-02-02 Thread Bhavesh agrawal
sry i does not help me On Wed, Feb 2, 2011 at 10:59 PM, nishaanth nishaant...@gmail.com wrote: how about put INT_MAX ..if we add 1 there will be a overflow right ? On Wed, Feb 2, 2011 at 10:50 PM, Logic King crazy.logic.k...@gmail.comwrote: I have submitted the code of the same problem on

Re: [algogeeks] Re: google mcqs

2011-01-16 Thread Bhavesh agrawal
answer is b Increasing the RAM of a computer typically improves performance because: a. Virtual memory increases b. Larger RAMs are faster c. Fewer segmentation faults occur d. Fewer page faults occur -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: google mcqs

2011-01-16 Thread Bhavesh agrawal
ans is a of Increasing the RAM of a computer typically improves performance because: a. Virtual memory increases b. Larger RAMs are faster c. Fewer segmentation faults occur d. Fewer page faults occur -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Re: google mcqs

2011-01-16 Thread Bhavesh agrawal
sry ,answer is a mistakingly written b. On Mon, Jan 17, 2011 at 9:58 AM, Sarma Tangirala tvssarma.ome...@gmail.comwrote: Are larger RAMs faster? I am so sure about that. Sent from my BlackBerry -- *From: * Bhavesh agrawal agr.bhav...@gmail.com *Sender

Re: [algogeeks] Sort string based upon the count of characters

2011-01-12 Thread Bhavesh agrawal
we can also the concept of HASHING to count the frequency of each character . On Thu, Jan 13, 2011 at 11:53 AM, Davin dkthar...@googlemail.com wrote: Smaple Data : input : abcdacdc Output : cadb If the count is same for characters. maintain the original order of the characters from