[algogeeks] Job Openings at Adobe India

2014-01-07 Thread Lalit Sharma
share your resumes with me. -- Lalit Sharma | Member of Technical Staff | Adobe Systems ,Noida , India | Contact No : +91-8130-321-181 . -- 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

Re: [algogeeks] Address of var

2011-07-25 Thread LALIT SHARMA
yes... On Mon, Jul 25, 2011 at 8:11 PM, Mani Bharathi manibharat...@gmail.comwrote: so ans is logical address right? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To view this discussion on the web visit

Re: [algogeeks] explain plzz:output in file old.out

2011-07-22 Thread LALIT SHARMA
No, actually , a is defined as char ... and comparing char with EOF ,, makes it go in infinte loop...as it never returns false. correct me if i am wrong... On Fri, Jul 22, 2011 at 11:41 PM, aditi garg aditi.garg.6...@gmail.comwrote: @shady. so in this case we shud use a!=-1 as the condition??

Re: [algogeeks] explain plzz:output in file old.out

2011-07-22 Thread LALIT SHARMA
@script kiddle y u r rght ...i can smell too.. :P On Fri, Jul 22, 2011 at 11:52 PM, varun pahwa varunpahwa2...@gmail.comwrote: For breaking the first loop after the input gives EOF. u can write it as. for(;~scanf(%c,a); ) On Fri, Jul 22, 2011 at 11:43 PM, LALIT SHARMA lks.ru

Re: [algogeeks] Re: how to optimally compute a matrix (nXn) to the power of k?

2011-07-19 Thread LALIT SHARMA
@rishabh , thnX a lot :P Plz explain further :P On Tue, Jul 19, 2011 at 10:15 PM, snehi jain snehijai...@gmail.com wrote: @Rishab Thanks .. could you explain what your are doing in the function exp().. On Tue, Jul 19, 2011 at 9:47 PM, Rishabh Maurya poofiefoo...@gmail.comwrote:

Re: [algogeeks] Find the missing number - Again given 4 billion integers

2011-07-18 Thread LALIT SHARMA
@ankit , can u xplain , the basics involved...m not able to get ur approach .. :( On Mon, Jul 18, 2011 at 11:06 AM, ankit sambyal ankitsamb...@gmail.comwrote: I also interpreted it the same way -- You received this message because you are subscribed to the Google Groups Algorithm Geeks

Re: [algogeeks] Mutex

2011-06-17 Thread LALIT SHARMA
There is very thin line of difference between semaphore and mutex,, mutex are like binary semaphore ,,but the are concerned about execution of any piece of code (critical section) ,where as a semaphore is program construct which can be used to just hold a lock on a set of resources . As said by

Re: [algogeeks] Re: find output.

2011-06-16 Thread LALIT SHARMA
++*p++ == ++(*p++) , increments the value stored at p , and also increments p . On Thu, Jun 16, 2011 at 1:10 PM, sunny agrawal sunny816.i...@gmail.comwrote: The place where strict constness is not enforced is with character array literals. You can say char* cp = howdy; and the compiler

Re: [algogeeks] Re: find output.

2011-06-16 Thread LALIT SHARMA
, which throws a seg fault On Thu, Jun 16, 2011 at 2:16 PM, Kamakshii Aggarwal kamakshi...@gmail.com wrote: i still din't get the solution..please explain.. On 6/16/11, LALIT SHARMA lks.ru...@gmail.com wrote: ++*p++ == ++(*p++) , increments the value stored at p , and also

[algogeeks] Puzzle

2011-06-09 Thread LALIT SHARMA
A helicopter drops two trains, each on a parachute, onto a straight infinite railway line. There is an undefined distance between the two trains. Each faces the same direction, and upon landing, the parachute attached to each train falls to the ground next to the train and detaches. Each train

Re: [algogeeks] A simple C question

2011-06-05 Thread LALIT SHARMA
: Process don't share address space when forked. On Fri, Jun 3, 2011 at 10:40 PM, nitish goyal nitishgoy...@gmail.com wrote: @ Lalit You are right. that's why i am saying how i can use semaphores in the above example On Fri, Jun 3, 2011 at 10:37 PM, LALIT SHARMA lks.ru...@gmail.com

Re: [algogeeks] A simple C question

2011-06-03 Thread LALIT SHARMA
While using fork(), child shares parent address space , Correct me If I am wrong .. On Fri, Jun 3, 2011 at 10:28 PM, nitish goyal nitishgoy...@gmail.com wrote: Hi all, I am stuck with this code..Can anyone tell me how to implement semaphores in fork system call Code: #includestdio.h int

Re: [algogeeks] remove duplicate chars in a string without using extra memory

2011-06-03 Thread LALIT SHARMA
@Johari , You have correctly mapped but the question demanded , to remove all repetition , though the string is still the same as it was given in input . On Fri, Jun 3, 2011 at 7:00 PM, Kunal Patil kp101...@gmail.com wrote: If you are not going to allow extra space, you have to compromise on

Re: [algogeeks] Odd Even Sort array

2011-05-27 Thread LALIT SHARMA
It will give correct answer , but instead of doing manipulation after taking input. as it would take some O(n) time. if n would be large , we would incur this extra cost . we should change the termination condition of merge-sort function and modify the merge function of merge sort ..to reach our

Re: [algogeeks] books

2011-04-21 Thread LALIT SHARMA
Please mail me 2 , my id is lks.ru...@gmail.com thnX in Advance .. On Thu, Apr 21, 2011 at 12:45 PM, kamlesh yadav kamleshlu2...@gmail.com wrote: can anyone give me  list of books  like ( cracking the coding interview )  for placement preparation thanks in advance. -- You received this

Re: [algogeeks] [brain teaser ] Math Prime number puzzle 15april

2011-04-15 Thread LALIT SHARMA
9+26 = 53 lolzz... On Fri, Apr 15, 2011 at 3:20 PM, hary rathor harry.rat...@gmail.com wrote: it true because 2*2+26 =30 which is not prime number 3*3+26=53 which is prime number these both statement contradicting that given expression is not suitable for all prime number so

Re: [algogeeks] Re: Need help on Divide and Conquer Algorithm

2011-04-14 Thread LALIT SHARMA
Yes , I also need the same...Thanks for the help . On Fri, Apr 15, 2011 at 12:52 AM, vishwakarma vishwakarma.ii...@gmail.comwrote: I can post solution of this complexity if you want !! On Apr 15, 12:19 am, vishwakarma vishwakarma.ii...@gmail.com wrote: complexity : O(n) + O(nlogn)

Re: [algogeeks] Re:

2011-04-03 Thread LALIT SHARMA
:P On Sun, Apr 3, 2011 at 9:46 AM, Dr. Deepak Garg dr.gar...@gmail.com wrote: Beta, puchna hi tha, to mujhse puchte! Anyways, you will get the solution in tomorrow's lecture @1pm. I have gone through your profile. See me in my cabin after the class. Make sure that you attend tomorrow's

[algogeeks] HELP - printf

2011-01-22 Thread LALIT SHARMA
*case 1 :* #include stdio.h #include math.h #include conio.h int main() { float i = 2.5; printf (%f %f\n, floor(i), ceil(i)); getch(); return 0; } *ans : 2.00 3.00* *case 2: * #include stdio.h #include math.h #include conio.h int main() { float i = 2.5; printf (%d

Re: [algogeeks] OS galvin sol..

2011-01-21 Thread LALIT SHARMA
...@gmail.com wrote: wow..thank you so much On Wed, Jan 19, 2011 at 2:08 PM, LALIT SHARMA lks.ru...@gmail.comwrote: -- Lalit Kishore Sharma, IIIT Allahabad (Amethi Capmus), 6th Sem. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group

Re: [algogeeks] Re: Google Interview Question

2011-01-08 Thread LALIT SHARMA
@bittu I would like to discuss one thing regarding your approach , How you managed to put forward your 1st statement that is of Synchronization . On Fri, Jan 7, 2011 at 1:18 PM, Pedro Rezende web...@gmail.com wrote: Hi all! And what could be the best way to test / debug issues like these?

Re: [algogeeks] Re: Adobe - Coding

2011-01-08 Thread LALIT SHARMA
@bittu , I think RLE , would be of no use ; as inp:AAABBRRGH out :3A2B2R1G1H so to reach the top 5 counts , there will be of no use . as stated earlier by others , HASH TABLE will be the one of best solution for this . maintain hash table in O(n) and then sort it .for top 5 counts. Please

Re: [algogeeks] Re: switch vs if -- which is faster

2010-11-22 Thread LALIT SHARMA
studying and teaching courses about compilers on and off for over 15 years and building some myself. BTW, u c I won't ansr mor ??s if wrds arnt spld out... On Nov 22, 12:28 am, LALIT SHARMA lks.ru...@gmail.com wrote: @dipankar Can u tell us , sumthng more in support of ur ans

Re: [algogeeks] Re: switch vs if -- which is faster

2010-11-21 Thread LALIT SHARMA
@dipankar Can u tell us , sumthng more in support of ur ans...?? On Mon, Nov 22, 2010 at 10:40 AM, DIPANKAR DUTTA dutta.dipanka...@gmail.com wrote: both are same .. because any good optimizing compiler generate same assembly code of them... On Mon, Nov 22, 2010 at 9:38 AM, Gene

[algogeeks] Happy Diwali ..

2010-11-05 Thread LALIT SHARMA
Wish u all a happy diwali ... -- Lalit Kishore Sharma IIIT Allahabad (Amethi Capmus) 5th Sem -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send

Re: [algogeeks] compute all subset in given array

2010-11-02 Thread LALIT SHARMA
Have a look at this code #include iostream #include cmath using namespace std ; int main() { int n ; cin n; int a[n] ; for(int i=0;in;i++) cin a[i] ; for(int i=1;i=pow(2,n);i++){ for(int j=0;jn;j++){ if( i (1 j)) { cout