[algogeeks] salutations..

2013-07-21 Thread rashmi i
 http://spiderplateformes.com/koain/jmgjybpjxnynm














 rashing





















 7/21/2013 2:18:03 PM

-- 
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] Amazon interview Question

2013-02-12 Thread rashmi i
Hey Pralay,
Sorry, if I have missed any point.Why would we need to map the
frequencies when the second problem can be solved by simply keeping a count
and comparing the index values that have been already mapped.


On Fri, Feb 8, 2013 at 11:19 AM, sourabh jain wsour...@gmail.com wrote:

 One solution for the 2nd question can be LinkedHashMap (linked list +
 hashmap) .
 Store the integer in linked list in the order of occurrence in stream and
 make an entry in hashmap on first occurence. Delete the integer entry from
 linked list on 2nd occurence and replace the reference with some special
 value so for 3rd time no need to touch the linked list. while printing the
 result print first k integers from linked list.


 On Fri, Feb 8, 2013 at 9:46 AM, bharat b bagana.bharatku...@gmail.comwrote:

 @sourabh : how do u find whether the element in stream gets repeated in
 heap.-- O(n) time...totally its O(nk) algo ..

 If we maintain max-heap with BST property on index, then it would be
 O(nlogk).


 On Wed, Feb 6, 2013 at 12:25 PM, sourabh jain wsour...@gmail.com wrote:

 for 2nd question you can make a heap with their index as a factor to
 heapify them. whenever a integer in stream gets repeated you just nead to
 remove it from heap and heapify it.


 On Wed, Feb 6, 2013 at 10:00 AM, navneet singh gaur 
 navneet.singhg...@gmail.com wrote:

 nice algo ankit, so it will be nlogn using O (n) space only. What abt
 2nd Q., which have a big online stream.

 On Mon, Feb 4, 2013 at 9:30 PM, kumar ankit k.anki...@gmail.com
 wrote:
  For 1:
  i think you can use sorting, sort the array and keep the indices of
 the
  numbers in the sorted list.
  Now traverse the sorted list and  in the sorted list you need to find
 the
  unique number with the
  minimum index which is easy to find.
 
  Eg: Array:5 3 1 2 4 1 4
Indices: 0 1 2 3 4 5 6
 
 
  After sorting : Array:1 1 2 3 4 4 5
  Indices:  2 5 3 1 4 6 1
 
  Now you can see the unique number with lowest index is 3(index=1). So
 , you
  have your answer.
 
 
  On Mon, Feb 4, 2013 at 3:45 PM, navneet singh gaur
  navneet.singhg...@gmail.com wrote:
 
  1. Given a array,find a first unique integer.
  2. Integers are coming as online stream,have to find a kth unique
 integer
  till now.
 
  For 1.
 
  Even we cannot use sorting for solving this as if we sort it than our
  first number which is non-repetitive changes.
 
  The best I am able to do is nlogn using a space of O( n ).
 
  For 2. No 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.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
 
 
  --
  Kumar Ankit
  Senior Undergraduate
  Department of Computer Engineering
  Institute of Technology
  Banaras Hindu University
  Varanasi
  Ph: +91 9473629892
 
  --
  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.
  For more options, visit https://groups.google.com/groups/opt_out.
 
 



 --
 navneet singh gaur

 --
 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.
 For more options, visit https://groups.google.com/groups/opt_out.





 --
 Regards,
 Sourabh Kumar Jain
 +91-8971547841

 --
 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.
 For more options, visit https://groups.google.com/groups/opt_out.




  --
 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.
 For more options, visit https://groups.google.com/groups/opt_out.






 --
 Regards,
 Sourabh Kumar Jain
 +91-8971547841

 --
 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.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [algogeeks] Re: symantec

2011-09-29 Thread rashmi i
mmm... i dont remember the questions but these are the 1s i faintly
remember:
1. semaphore based qs
2. a question from theory of computation
3. some questions on the big O-notation.
4. b-tree vs b+-tree
5. some questions on unix
6. http,tcp based qs..
well sorry but these r da 1s i m able 2 recollect.

On Thu, Sep 29, 2011 at 10:36 AM, swetha rahul swetharahu...@gmail.comwrote:

 @ Rashmi thanks a lot


 On Thu, Sep 29, 2011 at 8:49 AM, siva viknesh sivavikne...@gmail.comwrote:

 @rashmi .thanks of lot for sharing.It would be of great
 help if u detail much about written test pattern and share the
 questions whatever u remember...thanks in advance..

 On Sep 29, 6:40 am, sush57 sushaant...@gmail.com wrote:
  didsymanteccome to your col...how many did they shortlist in first
  rounds...can u say pattern of written test...
 
  On Sep 28, 11:30 pm, rashmi i rash...@gmail.com wrote:
 
 
 
 
 
 
 
   they have a package of around 5.8 in hand. they have a written test
 followed
   by 2-3 interviews.The written test questions belonged to previous
 years GATE
   questions. The interviews were easier and the questions ranged  from
 OS, OOP
   concepts, Java, Databases.
 
   On Wed, Sep 28, 2011 at 12:09 AM, swetha rahul 
 swetharahu...@gmail.comwrote:
 
can anyone tell the recruitment procedure ofsymantec?
what is the package?
 
--
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, visit this group at
   http://groups.google.com/group/algogeeks?hl=en.
 
   --
   R@$!-!
   DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

 --
 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, 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 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.




-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] programming challenge

2011-09-28 Thread rashmi i
1. Datacenter Cooling

We have some rooms in our datacenter, and we need to connect them all with a
single cooling duct.

Here are the rules:

   - The datacenter is represented by a 2D grid.
   - Rooms we own are represented by a 0.
   - Rooms we do not own are represented by a 1.
   - The duct has to start at the air intake valve, which is represented by
   a 2.
   - The duct has to end at the air conditioner, which is represented by a
   3.
   - The duct cannot go in multiple directions out of the intake or the AC -
   they must be the two endpoints of the duct.
   - The duct must pass through each room exactly once.
   - The duct cannot pass through rooms we do not own.
   - The duct can connect between rooms horizontally or vertically but not
   diagonally.

Here is an example datacenter:

2  0  0  0

0  0  0  0

0  0  3  1


There are two possible ways to run the duct here:

2--0--0--0
 |
0--0--0--0
|
0--0--3  1

or

2  0--0--0
|  | |
0  0  0--0
|  |  |
0--0  3  1

Write a program to compute the number of possible ways to run the duct. For
the above example, the correct answer is 2.
Input format:

Your program should read from stdin. The input will be a series of integers
separated by whitespace.

The first two integers will be W and H, with width and height of the
datacenter. These will be followed by W*H more integers, specifying the 2D
grid representing the datacenter.
Output format:

Your program should write a single integer out to stdout: the number of
possible ways to run the duct.

See how fast you can make it.

Our best solution (written in C) can solve the following test case in under
5 seconds on a 2.4GHz Pentium 4, but it's pretty good if you can get to
within 1-2 orders of magnitude of that.

7 8
2 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
3 0 0 0 0 1 1



-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] symantec

2011-09-28 Thread rashmi i
they have a package of around 5.8 in hand. they have a written test followed
by 2-3 interviews.The written test questions belonged to previous years GATE
questions. The interviews were easier and the questions ranged  from OS, OOP
concepts, Java, Databases.

On Wed, Sep 28, 2011 at 12:09 AM, swetha rahul swetharahu...@gmail.comwrote:

 can anyone tell the recruitment procedure of symantec?
 what is the package?

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] SAP!!

2011-08-21 Thread rashmi i
Cummins College, Pune.

On Sun, Aug 21, 2011 at 9:16 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:

 which college?

 On Sun, Aug 21, 2011 at 8:56 PM, rashmi i rash...@gmail.com wrote:


 Hey, SAP is visiting our college. Any idea about the pattern of the campus
 selection  process? As in type of questions asked? Thanks
 --
 R@$!-!
 DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards,
 Kamakshi
 kamakshi...@gmail.com

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] SAP!!

2011-08-21 Thread rashmi i
Kamakshi, do u have any idea about the SAP placement questions?

On Sun, Aug 21, 2011 at 9:28 PM, rashmi i rash...@gmail.com wrote:

 Cummins College, Pune.


 On Sun, Aug 21, 2011 at 9:16 PM, Kamakshii Aggarwal kamakshi...@gmail.com
  wrote:

 which college?

 On Sun, Aug 21, 2011 at 8:56 PM, rashmi i rash...@gmail.com wrote:


 Hey, SAP is visiting our college. Any idea about the pattern of the
 campus selection  process? As in type of questions asked? Thanks
 --
 R@$!-!
 DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards,
 Kamakshi
 kamakshi...@gmail.com

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 R@$!-!
 DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.




-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] shop keeper and the buyer

2011-08-14 Thread rashmi i
*I GUESS THE example u have cited is a bit incomplete, as in you havent
included anything for the 3rd item . If you want to buy all items then some
provision for the 3rd item has to be made as well. Coreect me, if I am
wrong.*

On Sun, Aug 14, 2011 at 7:21 PM, Prakash D cegprak...@gmail.com wrote:

 no one to help ??


 On Sat, Aug 13, 2011 at 10:48 PM, Prakash D cegprak...@gmail.com wrote:

 k lets assume that there are 10 kinds of item in the shop
 price[]={10,20,30,40,50,60,70,80,90,100}
 quantity[]={5,5,5,5,5,5,5,5,5,5}

 say no.of items having some free discounts : 5

 say p,q,r denotes  buying q nos. of p we will get one r for free.. let
 them be

 5 4 1
 2 5 1
 8 2 10
 9 1 10
 1 5 10

 explain for this case.. how will u proceed?



 On Sat, Aug 13, 2011 at 7:25 PM, Aditya Virmani virmanisadi...@gmail.com
  wrote:

 if k is fixed, sort the items according to their price, buy k cheapest
 items  start taking the most expensive item fr free



  --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: How to hash Strings

2011-08-14 Thread rashmi i
*My interpretation of the questions is that if number of strings are
provided, you need to hash them to an array. So, in that case you can
maintain an array of char pointers..and use some hash function such as some
arithmetic on the ascii value of first character of the string...and the
array element would contain address of that string. Correct me, if I am
wrong. Thanks*

On Sun, Aug 14, 2011 at 11:15 PM, Dave dave_and_da...@juno.com wrote:

 @Rohit: Let T be an array of length 256 that contains a permutation of
 the numbers between 0 and 255. Then to hash string s[],

 h = 0;
 for( i = 0 ; s[i] ; ++i )
h = T[h^s[i]];  // or  h = T[h] ^ s[i];

 You can choose a random permutation for T, or, if you have a small
 known set of strings (e.g. C keywords), you can try to tailor T so
 that each given string has a unique hash value.

 Dave

 On Aug 14, 11:36 am, rohit raman.u...@gmail.com wrote:
  I came accross a problem where i need to hash strings..
  What is the best way to hash strings??

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-08-14 Thread rashmi i
Infosys and TCS are consultancies. So, the type of job is not fixed. It
depends on the type of project a client provides, so it may involve variety
of technologies from C to Java , Perl,etc.

On Sun, Aug 14, 2011 at 11:31 PM, sukran dhawan sukrandha...@gmail.comwrote:

  can anyone tell me what is the job provided by infosys and tcs?
 IF they do so much mass recruitment what kinda job the ppl get der?

 --
 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, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] java output

2011-08-06 Thread rashmi i
i guess it's because of the order in which execution of the statement takes
place
the function gets excecuted before the increment due to some reason i m
unaware of. sorry can't come up with a stronger reason

-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Java output

2011-08-06 Thread rashmi i
I guess the answer is that...i is post incremented..and in post increment
..increment occurs after the assignment operation

-- 
R@$!-!
DoN'T LimIt Ur cHaLlEngeS, ChAlLenGe uR LImItS.

-- 
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, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.