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

2015-06-19 Thread Ankit Agarwal
tring(), Search.class); >> *}* >> >> >> *but its 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, s

[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 M

Re: [algogeeks] Re: Highest reminder

2013-05-30 Thread Ankit Agarwal
from it, send an > email to algogeeks+unsubscr...@googlegroups.com. > > > -- *Ankit Agarwal* *Software Engineer* *Datacenter & Cloud Division* *Citrix R&D India Pvt. Ltd.* *Ph. No. +91-8095470278* -- You received this message because you are subscribed to the Google Grou

Re: [algogeeks] Re: Highest reminder

2013-05-30 Thread Ankit Agarwal
*Winshuttle Softwares(India) Pvt. Ltd.* >> *Mobile +91-89012-36292, +91-80535-66286* >> *Email: sanjay.ku...@winshuttle.com* >> * >> *** >> >> * * >> >> ** >> * >> * >> >> >> On Thu, May 30, 2013 at 9:40 AM, Ankit Agarwal wrote: &g

Re: [algogeeks] Re: Highest reminder

2013-05-29 Thread Ankit Agarwal
that highest reminder can be got if I divide the number by (⌊(n/2) >>>>> ⌋+1) .Can anyone give me pointers ? >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group

Re: [algogeeks] Re: Highest reminder

2013-05-29 Thread Ankit Agarwal
cause 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 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.

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

2013-05-26 Thread Ankit Agarwal
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. >> >> >> > > -- > You received this message beca

[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 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 message because you

[algogeeks] Re: Median of 2D matrix

2011-11-04 Thread ankit agarwal
diagonal and find the middle element, that will be the median. Thanks Ankit Agarwal On Nov 5, 1:29 am, Gene 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 >

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 Te

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\

Re: [algogeeks] Re: puzzle

2011-06-26 Thread Ankit Agarwal
> >> > -- >> > **With Regards >> > Deoki Nandan Vishwakarma >> > IITR MCA >> > * >> > * >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post t

Re: [algogeeks] c code help

2011-06-23 Thread Ankit Agarwal
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 opti

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]

Re: [algogeeks] C Output

2011-05-29 Thread Ankit Agarwal
less quantity with 0.08 > i.e 'if ' condition is true and print it HELLO > > On Sun, May 29, 2011 at 9:21 AM, Ankit Agarwal wrote: > >> #include >> >> int main(void) >> { >> float a=0.08; >> if(a<0.08) >> printf("

[algogeeks] C Output

2011-05-29 Thread Ankit Agarwal
#include int main(void) { float a=0.08; if(a<0.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 &quo

Re: [algogeeks] Re: c program output

2011-02-07 Thread ankit agarwal
Thanq ol... On Mon, Feb 7, 2011 at 8:56 PM, Dave 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 wrote: > > But is the bug in the given program > > >

Re: [algogeeks] c program output

2011-02-07 Thread ankit agarwal
uot;Hello!!!\n"); > return 0; > } > you will get : > Hello!!! > > On Mon, Feb 7, 2011 at 8:22 PM, ankit agarwal wrote: > >> #include >> >> int main() >> { >> float a=11.202; >> if(a<11.202) >> printf(&qu

[algogeeks] c program output

2011-02-07 Thread ankit agarwal
#include int main() { float a=11.202; if(a<11.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 subscrib

Re: [algogeeks] Puzzle

2011-01-27 Thread ankit agarwal
groups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > S.Nishaanth, > Computer Science and engineering, > IIT Madras. > > -- > You received this message because you are subscr

[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 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 been 2 as we're going to p

[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 wrote: > you will be given an input no. n u have to output nth tw

[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 hash[a[i]]+

[algogeeks] Re: An O(1) data structure question

2010-11-04 Thread ankit agarwal
Hi, What will happen if the numbers are 1,1,10001,10002 etc.. then you will lot of memory. On Nov 4, 11:41 am, Naveen Kumar wrote: > Hi, > > If we don't have to preserve the order than, > > a[1...N] can be used and if we have input like 1,4,3,6 > > Insertion can be done as > a[1]++, a[4]++,

[algogeeks] Re: Binary Tree

2010-10-23 Thread ankit agarwal
Do level order traversal using two queues. On Oct 23, 8:19 pm, "juver++" 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 wrote: > > > > > > > > > hi, i need to find the

[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+R wrote: > You are given N blocks of height 1…N

[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 wrote: > int main() > { > int i; > c

[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 wrote: &