Re: [algogeeks] Improve data store for this particular Code Chef problem to improve performance in time

2013-07-09 Thread abhishek sharma
sharma wrote: > @Tian tanx > > > On Tue, Jul 9, 2013 at 5:55 PM, abhishek sharma > wrote: > >> Okay let me explain my approach - >> >> 1. Read numbers from the input stream and create an array of lists.. i >> started with hashmaps and hashsets etc .. but they g

Re: [algogeeks] Improve data store for this particular Code Chef problem to improve performance in time

2013-07-09 Thread abhishek sharma
peID: abhishekpc87iit.. Feel free to contact me .. always online.. On Tue, Jul 9, 2013 at 5:32 PM, Tian Guo wrote: > Can you just briefly describe your algorithm and time complexity? Then we > could know the problem and think about from which perspective to improve it. > > Th

Re: [algogeeks] Improve data store for this particular Code Chef problem to improve performance in time

2013-07-09 Thread abhishek sharma
@Tian tanx On Tue, Jul 9, 2013 at 5:55 PM, abhishek sharma wrote: > Okay let me explain my approach - > > 1. Read numbers from the input stream and create an array of lists.. i > started with hashmaps and hashsets etc .. but they greatly killed > performance > > 2. Each ind

[algogeeks] Improve data store for this particular Code Chef problem to improve performance in time

2013-07-09 Thread abhishek sharma
eating :) -- Nice Day Abhishek Sharma Bachelor of Technology IIT Kanpur (2009) -- 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 al

Re: [algogeeks] Re: CISCO Written Test ??

2012-08-29 Thread Abhishek Sharma
50 questions were there in written test ( aptitude (22), c, c++, signals, networking, 8085, 8086) I got 35/ 50 in written test. In interviews, they asked questions like what is polymorphism, reverse a linked list, explain quicksort etc. On Mon, Aug 27, 2012 at 8:40 AM, apoorv gupta wrote: > Der w

Re: [algogeeks] Fwd: Snapdeal placement proceedure

2012-08-29 Thread Abhishek Sharma
I appeared for snapdeal's exam on 27th.The question paper had 2 sections:aptitude and programming In aptitiude,there were questions like 1) find time after 2pm, where two hands of clock intersect 2)find max of two numbers without using if,else or comparison operators 3)3 ants on vertices of triangl

Re: [algogeeks] Local Minima in Unsorted Array

2012-08-09 Thread Abhishek Sharma
http://courses.csail.mit.edu/6.006/spring11/lectures/lec02.pdf On Mon, Aug 6, 2012 at 12:19 AM, dheeraj chawla wrote: > hello guys, check this code n tell me if i m worng > > int localminima(int a[],int start,int end) > {int mid; > > while(start { > mid=(start+end)/2; > if(a[st

Re: [algogeeks] directi paper pattern

2012-08-02 Thread Abhishek Sharma
please mail me too. Directi is coming for written test on this 8th in our college. Thanks in advance.. On Tue, Jul 31, 2012 at 11:48 PM, amit singh wrote: > hi shaukat Ali ,it will be really kind if you can forward me that paper > of directi > my ID:amitsingh...@gmail.com > > > On Tuesday, 31 J

Re: [algogeeks] Anagram problem

2012-07-18 Thread Abhishek Sharma
email to >>> algogeeks+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> >> >> -- >> Vindhya Chhabra >> >> >> >> -- >>

Re: [algogeeks] Re: [Google] Finds all the elements that appear more than n/3 times

2012-07-17 Thread Abhishek Sharma
gt;> msg/algogeeks/-/PxIJd3So3tkJ<https://groups.google.com/d/msg/algogeeks/-/PxIJd3So3tkJ>. >>> >>> >>> To post to this group, send email to algogeeks@googlegroups.com. >>> To unsubscribe from this group, send email to algogeeks+unsubscribe@** >>>

Re: [algogeeks] Re: Traverse a 2-D array of strings

2012-07-15 Thread Abhishek Sharma
roups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this grou

Re: [algogeeks] flipkart question

2012-07-07 Thread Abhishek Sharma
@Raj: trace karke dekh na yaar when u have 3 0s and 3 6s.. the sum distribution would look like this: given below are the possibilities: Combination of 1,2,3,4,5,6 with 0 1+0 = 1 2+0 = 2 3+0 = 3 OR 4+0 = 4 5+0 = 5 6+0 = 6 Combination of 1,2,3,4,5,6 with 6 1+6 = 7 2+6 = 8 3+6 = 9 OR 4+6

Re: [algogeeks] Help about compile in LISP

2012-07-07 Thread Abhishek Sharma
whats your purpose behind that ?? a) u want to understand the algorithm ? then go through backtracking and then try to solve the problem b) u want to learn LISP ?? then this is not the right place... u may want to go through LIPS tutorials and then have a look at at this problem again On Sun, Ju

Re: [algogeeks] Finding intersection of 2 linked lists

2012-07-05 Thread Abhishek Sharma
s, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > 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. >

Re: [algogeeks] Finding intersection of 2 linked lists

2012-07-04 Thread Abhishek Sharma
3 -> 4 -> 5, sorry for that silly mistakes On Wed, Jul 4, 2012 at 10:54 PM, Abhishek Sharma wrote: > it was 4 -> 5, not 4 -> 5 -> 6 > > > On Wed, Jul 4, 2012 at 10:41 PM, Abhi wrote: > >> Any efficient algorithm to find intersection of two linked lists.Exa

Re: [algogeeks] Finding intersection of 2 linked lists

2012-07-04 Thread Abhishek Sharma
eeks@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. > -- Abhishek Sharma Under-Graduate Student, PEC University of Technology

Re: [algogeeks] simple FILE reading problem.

2012-07-04 Thread Abhishek Sharma
and flag = 1 fetch last word (temp string) On Wed, Jul 4, 2012 at 10:51 PM, Abhishek Sharma wrote: > Fetch a character. > if isdigit( current_character ) > flag =1 > else if current_character is any character except space > > while current_

Re: [algogeeks] simple FILE reading problem.

2012-07-04 Thread Abhishek Sharma
google.com/d/msg/algogeeks/-/btvudXnBrAIJ. > 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.

Re: [algogeeks] Permuatation of string in caase of duplicte string it shouldnt print duplicates permutation .

2012-07-04 Thread Abhishek Sharma
t; -- >> 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...@googlegr

Re: [algogeeks] Re: adobe

2012-07-03 Thread Abhishek Sharma
> > > On Tue, Jul 3, 2012 at 3:14 PM, Abhishek Sharma wrote: > >> arr1 = (int *)malloc(sizeof(int) * ncols);// memory allocated for 1st >> row >> arr2 = (int **)malloc(sizeof(arr1) * nrows); >> >> I haven't tried it.So,please correct me if i am

Re: [algogeeks] Re: adobe

2012-07-03 Thread Abhishek Sharma
" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/Pr2cEtta_LsJ. > > 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

Re: [algogeeks] Question asked in Amazon Online Test

2012-06-29 Thread Abhishek Sharma
; >> >> >> -- >> Thanks & Regards >> Amritpal singh >> >> -- >> 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

Re: [algogeeks] can anyone tell me

2012-06-28 Thread Abhishek Sharma
naa noone can tell you.. haha.. just kidding... for OS refer the prescribed text. I studied from Silberschatz, Galvin, Gagne: *Operating System Concepts.. * amazing book.. just understand the basics.. like process shceduling algorithms, page shceduling algorithms, threads, context switching, virtu

Re: [algogeeks] Programming Question

2012-06-22 Thread Abhishek Sharma
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. > > -- Abhishek Sharma Under-Graduat

Re: [algogeeks]

2012-06-21 Thread Abhishek Sharma
t >>>>>> http://groups.google.com/group/algogeeks?hl=en. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Umer >>>>> >>>>> -- >>>>> You received this message

Re: [algogeeks] Microsoft Interview Question

2012-06-21 Thread Abhishek Sharma
group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Abhishek Sharma Under-Graduate Student, PEC University of Technology -- You received this message because you are subscribe

Re: [algogeeks] Re: Microsoft question

2012-06-21 Thread Abhishek Sharma
t;>>> >>> >>> -- >>> 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

Re: [algogeeks] Re: Reverse Queue

2012-06-20 Thread Abhishek Sharma
his group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > 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 gro

Re: [algogeeks] Re: MS Question: Reverse stack using push, pop without any auxiliary data structure

2012-06-18 Thread Abhishek Sharma
nd 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. > -- Abhishek Sharma Under-Graduate Student, PEC University of

Re: [algogeeks] Re: Power(n^n)

2012-06-07 Thread Abhishek Sharma
the input and return false On Fri, Jun 8, 2012 at 11:49 AM, Abhishek Sharma wrote: > You don't need to use BigNum or long int for this program. > Both n & k should be less than 1000. > Since there is no restriction on k,you don't need Bignum > Since both n,k are rest

Re: [algogeeks] Re: Power(n^n)

2012-06-07 Thread Abhishek Sharma
are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/s6ahKx0Sxe8J. > > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, se

Re: [algogeeks] If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2012-06-07 Thread Abhishek Sharma
> > -- > 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] Re: What would be the output for the following code fragment?

2012-06-07 Thread Abhishek Sharma
bits become 0010 (2 in decimal), last 8 bits remain same. Am i right ? On Thu, Jun 7, 2012 at 12:53 PM, Abhishek Sharma wrote: > @prem, i don't get it.could you please elaborate the interesting part of > this solution ? > > > On Thu, Jun 7, 2012 at 11:39 AM, Abhishek S

Re: [algogeeks] Re: What would be the output for the following code fragment?

2012-06-07 Thread Abhishek Sharma
@prem, i don't get it.could you please elaborate the interesting part of this solution ? On Thu, Jun 7, 2012 at 11:39 AM, Abhishek Sharma wrote: > Is there any online compiler which gives output for both little/big endian > machines ? > or it is fine to convert value from one f

Re: [algogeeks] Re: What would be the output for the following code fragment?

2012-06-06 Thread Abhishek Sharma
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 gr

Re: [algogeeks] What would be the output for the following code fragment?

2012-06-06 Thread Abhishek Sharma
quot;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.

Re: [algogeeks] 2 Dim array as parameter

2012-06-06 Thread Abhishek Sharma
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. > -- Abhishek Sharma Under-Graduate Student, PEC University of Technology --

[algogeeks] Abhishek Sharma wants to chat

2012-06-06 Thread Abhishek Sharma
--- Abhishek Sharma 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-f2b6967bf6-d78b18cba1-gqPKMkil32YfIMUTyJpM7k

[algogeeks] implementation of dijkstra

2012-06-04 Thread Abhishek Sharma
how to implement dijkstra algorithm using fibonacci heaps ?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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algog

[algogeeks] importance of heaps

2012-06-04 Thread Abhishek Sharma
can anyone please tell me how important are heaps as compared to other data structures (from interview's point of view). i am not talking about simple min/max heaps, but advanced ones like fibonacci heaps and binomial heaps -- You received this message because you are subscribed to the Google Gro

Re: [algogeeks] Re: amazon interview questions

2012-06-04 Thread Abhishek Sharma
;>> >>>>> -- >>>>> 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] If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2012-06-04 Thread Abhishek Sharma
hm 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. >

Re: [algogeeks] Re: find where the two list connect

2012-05-01 Thread Abhishek Sharma
@Bhupendra: your approach is correct but in case the linked lists contain millions of nodes then this might be an overhead. Another approach could be: - Start with the head of of both the lists. - Store (Hash) the addresses to which the current nodes are pointing to, in a hashtable. - while stori

Re: [algogeeks] Re: MS QUESTION_LINKED LIST

2012-03-24 Thread Abhishek Sharma
@Atul: after u sort the list the head pointer will automatically point to the smallest element so u actually return the head of the list. @Sambhavna: here is the Pseudoccode (More or less similar to, doing merge sort for arrays): Mersgesort(node ** list){ if( head==NULL or head-> next ==

Re: [algogeeks] Re: MS QUESTION_LINKED LIST

2012-03-23 Thread Abhishek Sharma
@don: inplace Mergesort can be used. Complexity would be O(nlogn). @Ashish: Heapsort is reliable but unstable and also, slower. On Sat, Mar 24, 2012 at 1:49 AM, Don wrote: > A merge sort will be O(n*log n) and not use the extra memory required > for a heap. > Don > > On Mar 23, 3:11 pm, Ashish G

Re: [algogeeks] MS QUESTION_LINKED LIST

2012-03-23 Thread Abhishek Sharma
It is basically sorting the linked list. Do not change the first pointer of nodes and use the second pointer for sorting. return the pointer to the smallest element. That's it. On Sat, Mar 24, 2012 at 12:50 AM, Atul Singh wrote: > Given a linked list with each node having two pointers : one point

[algogeeks] Given a String with unnecessary spaces, compact it in place

2011-10-10 Thread abhishek sharma
Can in place compaction be done without left shifts? -- Nice Day Abhishek Sharma Bachelor of Technology IIT Kanpur (2009) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@google

Re: [algogeeks] subset of an array

2011-10-10 Thread abhishek sharma
> 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 mo

Re: [algogeeks] Re: All valid dictionary words must be found and printed.

2011-10-04 Thread abhishek sharma
visit this group at > > >http://groups.google.com/group/algogeeks?hl=en. > > -- > 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 unsubscrib

Re: [algogeeks] Re: Sudoku

2011-10-04 Thread abhishek sharma
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. > > -- Nice Day Abhishek Sharma Ba

Re: [algogeeks] binary tree

2011-09-18 Thread abhishek sharma
for your question - On Sun, Sep 18, 2011 at 3:44 PM, abhishek sharma wrote: > hi prasanth, > > i was asked a similar ques but with the condition that path shud terminate > at a leaf node & u just have to return true if you are able to find a path. > > what i did was,

Re: [algogeeks] binary tree

2011-09-18 Thread abhishek sharma
roup. > 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. > -- Nice Day Abhishe

Re: [algogeeks] Elitmus test Help

2011-08-24 Thread Abhishek Sharma
similar to CAT though the level is little low... no technical questions are asked.. On Wed, Aug 24, 2011 at 11:50 PM, Akanksha . wrote: > It is a general aptitude test.. they ask u ques on quant, verbel n > problems solving skills.. prepare well if u r planning to take this > test as ques r tou

Re: [algogeeks] Puzzle

2011-08-18 Thread Abhishek Sharma
M (hint: replace ü and û with their actual meaning.. u 'll understand) On Fri, Aug 19, 2011 at 4:10 AM, payal gupta wrote: > was there anything more specified > Regards, > PAYAL GUPTA > > > On Fri, Aug 19, 2011 at 3:29 AM, Aditya Virmani > wrote: > >> If ü - Married >> û - Not Married a

Re: [algogeeks] Re: exit() vs. _exit()

2011-08-18 Thread Abhishek Sharma
exit() calls clean up codes (flushing the buffer etc) while _exit() does not.. FYI- pls use google for such questions. Regards, Abhishek On Thu, Aug 18, 2011 at 3:26 PM, Amol Sharma wrote: > anyone ?? > > -- > > > Amol Sharma > Third Year Student > Computer Science and Engineering > MNNIT Alla

Re: [algogeeks] Coding..........

2011-07-21 Thread Abhishek Sharma
small change in the pseudocode.. for (i=0 until i+ a[].length){ if (*leftptr % 2 == 0) A2[i] = *leftptr ; else if (*rtptr % 2 == 0) A2[i+a[].length-1] = *rtptr ; leftptr++; rtptr--; } -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" gr

Re: [algogeeks] Coding..........

2011-07-21 Thread Abhishek Sharma
scan the array from both the ends..i.e use two pointers to scan the array.. left pointer points at the beginning and right one one at the end.. left pointer can be used to find whether an element is even or not until it reaches end while right pointer can be used to find whthr a no is odd until it

Re: [algogeeks] Re: sbtration

2011-07-11 Thread Abhishek Sharma
@sunny: +1 On Tue, Jul 12, 2011 at 11:11 AM, Vishal Thanki wrote: > z = x + (-y) > > :) > > On Tue, Jul 12, 2011 at 10:58 AM, Sunny T wrote: > > i would say.. implementing subtraction using division and modulus is more > > costly and complicated. bit manipulation is the fastest among all > > the

Re: [algogeeks] sbtration

2011-07-11 Thread Abhishek Sharma
x-y = add(x, add(~y, 1)) here add(~y,1) refers to the Two's complement of y... On 7/12/11, Anika Jain wrote: > how to do subtraction of two integers widout using subtractn?? > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To pos

Re: [algogeeks] os

2011-06-22 Thread Abhishek Sharma
@rahul: buddy, u can ignore the mail if u don't want to answer (no offense). Lets not discourage someone from asking questions... On Tue, Jun 21, 2011 at 11:23 PM, rahul wrote: > If u want us to solve the GATE paper, please attach the paper, we will post > the solution. > > regards. > > > On Tue

Re: [algogeeks] Online Jobs for Students

2011-04-15 Thread Abhishek Sharma
Our all candidates of batch Sept 10 - Jan 11 got placed in top MNC companies with very lucrative salary like earlier batches. Most of the candidates had multiple job offers with min Rs. 15000/- in hand per month salary. Jan 11 - May 11 batch placement is running and almost 50% students has already

Re: [algogeeks] Are U a Student Must Read this Frwd This Please If u Like We R student like You TOO

2011-04-06 Thread Abhishek Sharma
@Carl: the one at the bottom works.. On Fri, Apr 1, 2011 at 1:17 AM, hary rathor wrote: > everybody want to be mark. > > -- > 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

Re: [algogeeks] Re: 28march

2011-04-06 Thread Abhishek Sharma
@sourabh: could u please elaborate how u came to that conclusion. Dave's logic seems to be right.. On Thu, Mar 31, 2011 at 11:00 AM, sourabh jakhar wrote: > answer is 6 races > > > > On Mon, Mar 28, 2011 at 11:53 PM, Dave wrote: > >> 7 races. >> >> For the first five races, divide the horses int

Re: [algogeeks] interview

2011-03-27 Thread Abhishek Sharma
*@Shady:* buddy lets not discourage som1 interested in learning :) this is the purpose of this group.. * @harry:* as some1 has said: "there is no shortcut to success".. first go through any good Datastructures/algorithms book.. try to code those algorithms on ur own..once u feel u r comfortable wit

Re: [algogeeks] Print Hello infinite..................

2011-03-15 Thread Abhishek Sharma
@nidhi: yup.. u r rite.. sorry..my bad... On Thu, Mar 10, 2011 at 11:58 AM, Nishant Agarwal < nishant.agarwa...@gmail.com> wrote: > #include > void print1(); > void print2() > { > printf("Hello\n"); > print1(); > } > void print1() > { > printf("Hello\n"); > print2(); > } > int mai

Re: [algogeeks] Print Hello infinite..................

2011-03-15 Thread Abhishek Sharma
thanks a ton for the info... we didnt know about that :P... btw for ur info.. we are not supposed to use loops as well.. On Fri, Mar 11, 2011 at 7:10 PM, Abhishek Mallick < abhishek.mallick2...@gmail.com> wrote: > #include > int main() > { > while(printf("Hello")); > return 0; > } > > On Thu, Ma

Re: [algogeeks] Link list Problem

2011-03-15 Thread Abhishek Sharma
modifying balaji's approach and adding few more things: traverse until u find the node...then loop copy data from the next node until u reach the last node then delete the last node. Ex: Consider the SLL: 1 -> 2 -> 3 -> 4 -> 5 Suppose the head pointer is lost and is currently pointing to '2'

Re: [algogeeks] Print Hello infinite..................

2011-03-09 Thread Abhishek Sharma
#include headers int main(){ printf("Hello"); main(); } On Mon, Mar 7, 2011 at 7:38 AM, Terence wrote: > system("yes Hello"); > (on Linux) > > > On 2011-3-7 2:09, sudheer kumar wrote: > > use GOTO > > On Sun, Mar 6, 2011 at 10:49 PM, UMESH KUMAR wrote: > >> How to print Hello Infinite times

Re: [algogeeks] Interview questions for multithreading in Java

2011-03-08 Thread Abhishek Sharma
what do u mean by multi-threading :P On Tue, Mar 8, 2011 at 7:37 PM, vaibhav agrawal wrote: > Hi, > > What interview questions one would expect for multi-threading? > > Thanks, > Vaibhav > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group.

Re: [algogeeks] Interview questions for multithreading in Java

2011-03-08 Thread Abhishek Sharma
is a low priority thread which runs intermittently in the background doing the garbage collection operation for the java runtime system On Tue, Mar 8, 2011 at 9:16 PM, Abhishek Sharma wrote: > what do u mean by multi-threading :P > > > On Tue, Mar 8, 2011 at 7:37 PM, vaibhav agrawal wrot

Re: [algogeeks] [brain teaser ] 1march

2011-03-01 Thread Abhishek Sharma
beetle :P On Tue, Mar 1, 2011 at 2:01 PM, Ankur pratik wrote: > beetle > > -- > 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] Maths

2011-02-22 Thread Abhishek Sharma
This is simple.. Find the values for f(n) for n=1,2,3,4,... n-1 which are 0, 1, 2, 3, ... n-2 respectively. (Solve the equation for n=2,3, etc to get the values). >From the pattern you can easily find out that f(n+1)= n. On Wed, Feb 16, 2011 at 9:15 PM, Vikas Kumar wrote: > f(n)=n-1. > > > On

Re: [algogeeks] can i know the best way to learn programming??

2011-02-02 Thread Abhishek Sharma
dude... Practice is the only solution to ur problem... U can try any one of the following: topcoder, spoj, (already mentioned in the thread) codechef etc... U can also refer to previous posts in this group and try to code those problems on your own and then refer to the solutions to check where y

Re: [algogeeks] Sites for Interview Questions

2011-01-21 Thread Abhishek Sharma
Programming Interviews Exposed is a good one.. On Tue, Jan 18, 2011 at 9:27 PM, Yellow Sapphire wrote: > Hi, > > Can someone suggest good books/websites/blogs for interview related > questions. > > > thanks-- > YS > > -- > You received this message because you are subscribed to the Google Groups

[algogeeks] Algorithm

2010-07-05 Thread Abhishek Sharma
You are given a set of phrases (let us call them keywords), each of 1-4 words. Group the keywords into clusters (groups of keywords) by picking keywords which are similar to each other. There are multiple ways to cluster(group) them 1) using single keyword as the cluster name. Eg cluster name "gif

Re: [algogeeks] Amazon: sort array

2010-07-02 Thread Abhishek Sharma
I think its similar to the merge operation which is used in merge sort... correct me if I am wrong.. Regards, Abhishek On Sat, Jul 3, 2010 at 12:00 AM, ANKUR BHARDWAJ wrote: > Given an array of n elements and an integer k where k {a[0].a[k] and a[k+1].a[n] are already sorted. Give an >

Re: [algogeeks] Amazon: sort array

2010-07-02 Thread Abhishek Sharma
@Anand: good one On Sat, Jul 3, 2010 at 2:02 AM, Anand wrote: > This is an example of bitonic sequence if we reverse the bottom half of the > array. > Sequence is called Bitonics if the sequence of number first > increases(ascending order) and then decrease(descending order). > > 1. We need to r

Re: [algogeeks] Project on finding an optimal route given a map.

2010-07-02 Thread Abhishek Sharma
@Anand: > Let me know your input we can modify it accordingly. I have already mentioned it in previous posts.. for your sake I ll do it again.. Input is a a map of a small area..(some college campus)..it can be in the form of an image, osm format (www.openstreetmap.org) or in the kml format ( maps.

Re: [algogeeks] crazy

2010-06-29 Thread Abhishek Sharma
yeah its 1/2 On Tue, Jun 29, 2010 at 12:37 PM, ankur aggarwal wrote: > i think it shud be 1/2.. i will try to prove it... > > > On Mon, Jun 28, 2010 at 8:52 AM, sharad kumar wrote: > >> Problem :- A line of 100 airline passengers is waiting to board a plane. >> They each hold a ticket to one of t

Re: [algogeeks] Project on finding an optimal route given a map.

2010-06-28 Thread Abhishek Sharma
@senthil: thanks for the interest.. I did that purposely..(just wanted to see if any1 is interested or not).. here are the details... I have a map..of a small area (say a college campus).. in OSM(openstreetmap) format or it could also be in kml (google map) format.. Now the application is supposed

Re: [algogeeks] Re: O(n)

2010-06-28 Thread Abhishek Sharma
may be to figure out the range while reading the numbers or taking the mos as input... we can have two variables (min and max) that contains the minimum and maximum elements encountered so far respectively... i.e. whenever we read a no n we compare it with min and max... if nmax then max = n; so t

Re: [algogeeks] Re: O(n)

2010-06-28 Thread Abhishek Sharma
@abhirup: I agree with ur idea of sorting and then finding out the difference for the consecutive elementsbut counting sort takes the range into account.. I dont think range is given... On Mon, Jun 28, 2010 at 12:01 PM, Abhirup Ghosh wrote: > We can sort the array in O(n) time using counting

[algogeeks] Project on finding an optimal route given a map.

2010-06-27 Thread Abhishek Sharma
Hi friends, I am doing a project on finding an optimal route between two points given on a map (well just started with it...). The map can be in OSM/ kml format or it can be an image as well (for now i have ruled out this option..since this will involve image processing and i doubt the accuracy..O

Re: [algogeeks] c book

2010-06-19 Thread Abhishek Sharma
If you know the basics and want to make your base strong then i would suggest u to read "The C programming language" by Brian Kernighanand Dennis Ritchie . On Sun, Jun 20, 2010 at 1:21 AM, vishard sankhyan

Re: [algogeeks] Can you solve this?

2010-05-30 Thread Abhishek Sharma
Correction: Team2:7, 10, 11, 12, 15 On Sun, May 30, 2010 at 11:45 PM, Abhishek Sharma wrote: > @sharad: if you find the subarrays of equal sum then the number of players > might differ in the team... also can you tell me how will you do > that..according to me time cmoplexity will

Re: [algogeeks] Can you solve this?

2010-05-30 Thread Abhishek Sharma
@sharad: if you find the subarrays of equal sum then the number of players might differ in the team... also can you tell me how will you do that..according to me time cmoplexity will be higher.. According to me: sort the palyers based on skill points (O(nlogn) --mergesort) then assign the players

[algogeeks] Re: How to dived 2 integer number using bitwise opreration

2008-03-09 Thread abhishek sharma
ator. > > For Exmaple: > 12 divided by 6 = 2 quotient > > Thnaks in advance > > Amritanshu Agrawal > > > > -- regards Abhishek Sharma Student BTECH-INFORMATION TECHNOLOGY NSIT,DWARKA NEW DELHI --~--~-~--~~~---~--~~ You received