Re: [algogeeks] Re: how to convert JSONObject object to java object ??

2015-06-19 Thread Ankit Agarwal
not working any idea ?* -- 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+unsubscr...@googlegroups.com. -- *Ankit Agarwal* *Software Engineer* *Seller

[algogeeks] Job openings in Limetray

2015-02-12 Thread Ankit Agarwal
Hey there, Limetray has a lot of openings in its Delhi office. Following is the list of current positions. If anything interests you, please send your resume to h...@hyring.com with the position you want to apply for as subject.For example: LeadMobile@limetray in case you want to apply for Lead

Re: [algogeeks] Re: Highest reminder

2013-05-30 Thread Ankit Agarwal
-66286* *Email: sanjay.ku...@winshuttle.com* * *** * * ** * * On Thu, May 30, 2013 at 9:40 AM, Ankit Agarwal ankuagarw...@gmail.comwrote: @Dave: For N = 23, the highest remainder is 12, not 11 On Thu, May 30, 2013 at 5:02 AM, Dave dave_and_da...@juno.com wrote: The highest

Re: [algogeeks] Re: Highest reminder

2013-05-29 Thread Ankit Agarwal
+unsubscr...@googlegroups.com. -- 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+unsubscr...@googlegroups.com. -- *Ankit Agarwal* -- You

Re: [algogeeks] Re: Highest reminder

2013-05-29 Thread Ankit Agarwal
group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+...@**googlegroups.com. -- *Ankit Agarwal* -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop

Re: [algogeeks] inplace merge of 2 sorted parts of an array

2013-05-26 Thread Ankit Agarwal
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+unsubscr...@googlegroups.com. -- *Ankit Agarwal* -- You received this message because you

[algogeeks] Re: Binary tree to BST

2011-11-05 Thread ankit agarwal
I think it's the only way as you need to traverse the entire binary tree to do it. On Oct 31, 9:45 pm, Ankuj Gupta ankuj2...@gmail.com wrote: How to convert a Binary tree to BST ? Naive way is to create each node of  Binary tree one by one and keep on creating the BST. -- You received this

[algogeeks] Re: Median of 2D matrix

2011-11-04 Thread ankit agarwal
the diagonal and find the middle element, that will be the median. Thanks Ankit Agarwal On Nov 5, 1:29 am, Gene gene.ress...@gmail.com wrote: Here's an idea.  Say we pick any element P in the 2D array A and use it to fill in an N element array X as follows. j = N; for i = 1 to N do   while A(i, j

Re: [algogeeks] Re: informatica pattern and question of interview

2011-09-14 Thread Ankit Agarwal
2 question numbers are (a1+1)*a2*a3... an = a1*a2*a3...an + a2*a3...an the first term is same... for second term is (a1*a2...an)/(a1) now we have to find max of ( ((a1*a2..an)/a1), (a1*a2...an)/a2) so the question of max becomes min of( a1, a2, a3... an) -- Ankit Agarwal Computer Science

Re: [algogeeks] Exchanging bit values in a number

2011-09-13 Thread Ankit Agarwal
let x = 2^j + 2 ^i new number after swapping the digits is x XOR n eg n = 1101 j = 6 i = 2 x = 0100 0100 new number = x XOR n = 0100 1001 -- Ankit Agarwal Computer Science Engg. Integrated Dual Degree, V yr Department of Electronics Computer Engineering Indian Institute of Technology

Re: [algogeeks] String Reverse

2011-08-29 Thread Ankit Agarwal
void function(int start, int end){ if (start end) return; int x= a[end]-a[start]; a[start] = a[start] + x; a[end] = a[end] - x; function(start+1, end-1); } main(){ scanf(%s, a[0]); int len = strlen(a); function(0,len-1); printf(%s\n, a); } -- Ankit Agarwal

Re: [algogeeks] Re: puzzle

2011-06-26 Thread Ankit Agarwal
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/group/algogeeks?hl=en. -- Ankit Agarwal

Re: [algogeeks] c code help

2011-06-23 Thread Ankit Agarwal
@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. -- Ankit Agarwal *Be the change that you want to see in the world... :)* *- Gandhiji* -- You

Re: [algogeeks] Re: sort the array

2011-06-22 Thread Ankit Agarwal
This problem can also be done by using Merging function as in the merge sort. 1. Copy the sorted elements of the first half in one array (arr L) and second half in another (arr R). Original array N. 2. count vary from 1 to n. if (L[i] R[j] ) { N[count] = L[i], i++} else { N[count] = R[j]

[algogeeks] C Output

2011-05-29 Thread Ankit Agarwal
#includestdio.h int main(void) { float a=0.08; if(a0.08) printf(Hello\n); else printf(Hii\n); return 0; } The o/p is: *Hello * why -- Ankit Agarwal -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group

Re: [algogeeks] C Output

2011-05-29 Thread Ankit Agarwal
is true and print it HELLO On Sun, May 29, 2011 at 9:21 AM, Ankit Agarwal ankitgeniu...@gmail.comwrote: #includestdio.h int main(void) { float a=0.08; if(a0.08) printf(Hello\n); else printf(Hii\n); return 0; } The o/p is: *Hello * why -- Ankit

[algogeeks] c program output

2011-02-07 Thread ankit agarwal
#includestdio.h int main() { float a=11.202; if(a11.202) printf(Hiii!!!\n); else printf(Hello!!!\n); return 0; } output: Hiii!!! why does this output comes??? Ankit Agarwal -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] c program output

2011-02-07 Thread ankit agarwal
); return 0; } you will get : Hello!!! On Mon, Feb 7, 2011 at 8:22 PM, ankit agarwal ankitgeniu...@gmail.comwrote: #includestdio.h int main() { float a=11.202; if(a11.202) printf(Hiii!!!\n); else printf(Hello!!!\n); return 0; } output: Hiii!!! why

Re: [algogeeks] Re: c program output

2011-02-07 Thread ankit agarwal
Thanq ol... On Mon, Feb 7, 2011 at 8:56 PM, Dave dave_and_da...@juno.com wrote: @Ankit: Yes. The bug is that the constant in the comparison should have been written 11.202e0. Dave On Feb 7, 9:05 am, ankit agarwal ankitgeniu...@gmail.com wrote: But is the bug in the given program

Re: [algogeeks] Puzzle

2011-01-27 Thread ankit agarwal
this group at http://groups.google.com/group/algogeeks?hl=en. -- Ankit Agarwal B.Tech. 3rd Year Computer Science Engineering IIT Rajasthan -- 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] Re: twin pair

2011-01-11 Thread ankit agarwal
as all prime no. greater than 3 are of the form 6n+1 or 6n-1 so start checking for all these numbers and if they both are prime then they will make pair count the pair no. as well as u move on Ankit On Jan 11, 9:23 pm, snehal jain learner@gmail.com wrote: you will be given an input no. n u

[algogeeks] Re: amazon questions

2011-01-11 Thread ankit agarwal
it is (p(a)p(b)+p(b)p(c)+p(c)p(a))/3 On Jan 12, 1:51 am, SVIX saivivekh.swaminat...@gmail.com wrote: anuragh assume each can shoot the target everytime... P(A) = 1 P(B) = 1 P(C) = 1 per your logic, the probability that the target will be hit is 3 actually, it should have only

[algogeeks] Re: how would you find the integer pairs which sum to m in o(n) time complexity

2010-11-17 Thread ankit agarwal
@mohit,ruturaj We dont need to know the range only if there are +ve no's. and then also we need only m/2 space. if(a[i]m) skip else if(a[i]m/2) if(hash[m-a[i]]==1)) return true; else hash[m-a[i]]++; else if(hash[a[i]]==1)) return true; else

[algogeeks] Re: Binary Tree

2010-10-23 Thread ankit agarwal
Do level order traversal using two queues. On Oct 23, 8:19 pm, juver++ avpostni...@gmail.com wrote: When visiting appropriate vertex v, increment counter + +levels[current_depth] and go further. You may done this using DFS or BFS. On 23 окт, 17:31, Harshal hc4...@gmail.com wrote:

[algogeeks] Re: regarding output

2010-10-11 Thread ankit agarwal
when you press enter after entering a character. scanf reads the character first time from the input buffer and the next time it reads only enter from input buffer. Solution to the problem is using fflush(stdin) after scanf command. On Oct 12, 2:25 am, carry pawan1991ya...@gmail.com wrote: int

[algogeeks] Re: arranging blocks

2010-10-11 Thread ankit agarwal
case 1: L+R=N+1 arrange Nth bloack at L position and from N-1 to N-L on its left in decreasing order. N-L-1 to 1 on its right in decreasing order. eg 3 4 5 6 2 1 for n=6 l=4 r=3 L+RN+1 proceed as above then place the remaining

[algogeeks] Re: Smallest window of K[] in N[]. Best order solution

2010-10-10 Thread ankit agarwal
Your Solution considers only those windows which contain continuous elements of query array in input array. It won't work for: i/p array : 12345 query array: 1235 also it won't work for: i/p array: 2 query array: 1112 Ankit Agarwal On Oct 10, 9:04 pm, Mridul Malpani malpanimri