Re: [algogeeks] Make File

2012-11-05 Thread Durgesh Kumar
1> It is a very important linux utility . 2> If U simply type make on terminal , it will look for makefile in the folder and subfolder and will execute it 3> If a program consists of several file eg :- main.c ,fun () in fun.c , type () in type.c . Now , suppose type calls fun() , main call both

Re: [algogeeks]

2012-02-06 Thread Durgesh Kumar
, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- *Durgesh Kumar* Final Year, B.tech Information Technology HALDIA INSTITUTE OF TCHNOLOGY HALDIA -- You received this message bec

Re: [algogeeks] fork command confusion

2012-01-17 Thread Durgesh Kumar
#include int main() { int i=0; printf("hello world \n"); i++; fork(); printf("forking %d",i); i++; } o/p :- hello world Can any1 explain this?? On 1/17/12, Durgesh Kumar wrote: > How can we join after the fork

Re: [algogeeks] fork command confusion

2012-01-17 Thread Durgesh Kumar
How can we join after the forking On 1/17/12, Durgesh Kumar wrote: > #include > > int main() > { > int i=0; > printf("helllo world %d\n",i); > i++; > fork(); //Fork Exeution Starts from here . > prin

Re: [algogeeks] fork command confusion

2012-01-17 Thread Durgesh 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] Complexity

2011-12-15 Thread Durgesh Kumar
ABAD > > -- > 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.c

Re: [algogeeks] Re: Merging Sorted Arrays

2011-07-07 Thread durgesh kumar
@dumanshu > ok ! i got a O(n lgn) finally > i don know exact complexity > Let N = size of first array > Find the first N smallest elements using one pointer in each array > now swap the list of elements from index 0 to second-pointer in > second array to first array > with first_poiner+1 to N in f

Re: [algogeeks] Re: Amazon

2011-07-07 Thread durgesh kumar
@oppilas:- yes U r right... i simply mistyped it...I think evrythng else is ok. thanks Durgesh -- 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: Amazon

2011-07-07 Thread durgesh kumar
@swathi:- nice try bt could u explain for A<1--->B<--6-->C<-3>D<--2>E thanks Durgesh -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, sen

Re: [algogeeks] Re: Amazon

2011-07-07 Thread durgesh kumar
sry it was mistyped -- 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, visi

Re: [algogeeks] Re: Amazon

2011-07-07 Thread durgesh kumar
dear swathi, i m not geetint solution for this pexample according to your algo.cold u explain me wth this example ... A<--1--->B<--5-->C<-3->D<2>E thanks in advance durgesh --

Re: [algogeeks] Re: Amazon

2011-07-07 Thread durgesh kumar
On Thu, Jul 7, 2011 at 4:15 PM, Gaurav Tyagi wrote: > How about this ? > > 1. We construct a graph with these nodes. > 2. We make an incoming edge on a node if it is created using some > other node. Ex: 7=5+2. So 7 will have 1 incoming and 5 & 2 will have > outgoing. > 3. Select all the nodes whi

Re: [algogeeks] Re: Amazon

2011-07-07 Thread durgesh kumar
On Thu, Jul 7, 2011 at 6:41 PM, Swathi wrote: > My solution, > > a) First sort the distances. > b) We will consider the first 2 minimum numbers.. They are definitely the > distances between the 3 nodes... > c) Find the sum of the first 2 minimum numbers.. If this sum is outside "n" > then we simp

Re: [algogeeks] Re: Amazon

2011-07-07 Thread durgesh kumar
step:- 1) sort the array 2) remove the smallest and largest element from arary. keep the smallest elemnt in seperate queue(result) 3) repeat the above untill the array is empty or it contains only it contains only one element 4) put the last element also in the queue (result) eg:-for ur example s