Re: [algogeeks] Snapdeal Paper Pattern

2012-08-24 Thread JITESH KUMAR
Which college?
I can help you.

On Wed, Aug 22, 2012 at 11:23 PM, Arun Kindra arunkin...@gmail.com wrote:

 Anyone know the paper pattern or ques of snapdeal? And What they
 demand(any specific language)?

 --
 Regards:

 *Arun Kindra*


  --
 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
Jitesh Kumar

There is only one 'YOU' in this world. You are Unique and Special.*
*Don't Ever Forget it.*

-- 
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] Snapdeal Paper Pattern

2012-08-24 Thread vaibhav shukla
its DU . please guide with watever details you have.
thanks

On Fri, Aug 24, 2012 at 4:42 PM, JITESH KUMAR jkhas...@gmail.com wrote:

 Which college?
 I can help you.


 On Wed, Aug 22, 2012 at 11:23 PM, Arun Kindra arunkin...@gmail.comwrote:

 Anyone know the paper pattern or ques of snapdeal? And What they
 demand(any specific language)?

 --
 Regards:

 *Arun Kindra*


  --
 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
 Jitesh Kumar

 There is only one 'YOU' in this world. You are Unique and Special.*
 *Don't Ever Forget it.*

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




-- 
best wishes!!
 Vaibhav

-- 
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: MS interview

2012-08-24 Thread GAURAV CHAWLA
@all .. i suggested him the hashing method... but was not convinced... he
might be expecting something else..   something like tries.. etc..

@ Karthikeyan Muthu... can u explain it in detail  with some ex ...

On Thu, Aug 23, 2012 at 11:28 PM, Karthikeyan Muthu 
keyankarthi1...@gmail.com wrote:

 i would suggest using tires data structure, basically a n-nary tree to
 store the dictionary. Entire algo is as follows:

 1) Create a trie http://en.wikipedia.org/wiki/Trie representing the
 dictionary.
 2) create a aux array for the search key. as count [ key[i] ] ++;
 3) Start a recursion from the root of the trie and pick a path if (count [
 path ]  0 )
   3rd step ensures that we traverse only those valid paths (ie valid
 words, this would reduce n! checking of all combinations).


 On Thu, Aug 23, 2012 at 8:23 PM, Ashish Goel ashg...@gmail.com wrote:

 yes, that is correct.
 O(mn) to form multimap and then O(m) to tell all anagram groups

 Best Regards
 Ashish Goel
 Think positive and find fuel in failure
 +919985813081
 +919966006652


 On Thu, Aug 23, 2012 at 5:11 PM, kings dns.bhar...@gmail.com wrote:

 Dear GC,

 The efficient data structure in my opinion is Hash Table.

 1. For a given word in the dictionary we need to form an anagram
 dictionary i.e. take a given word sort it which forms the key for the
 hashtable , then start forming the different anagrams for that word and
 insert it into the hash table with the corresponding key.

 2. Once the hash table is ready for the given word sort it find the key
 and print all the anagarams i.e. values associated to that key. we will get
 all the anagrams for a given word.

 Coming to time complexity...

 sorting of a word can be done in a O(nlogn).
 building of anagram will take O(n).
 hash complexity O(n) worst case.
 so total time complexity is O(nlogn) for whole execrcise.

 Thanks
 Bhargava


 On Wednesday, 22 August 2012 23:39:02 UTC+5:30, GC wrote:

 Ques..

 Given a m-word dictionary ... and a n-sized word... .. now suggest DS
 for dictionary such that you can find out all the anagrams of the given
 word present in dictionary...


 --
 Regards,
 G C



  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/ySPUSvS0Sh0J.

 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.


  --
 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,
GAURAV CHAWLA
+919992635751
+919654127192

-- 
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] MS interview

2012-08-24 Thread GAURAV CHAWLA
Ques  Given a large text... in the text.. there are  gt; , lt; etc
representing  and .(there can be others like eq;  etc)
   the task is to replace such (gt;) with the '' symbol...
and (lt;) with ''
   given the table which have corresponding matches... and
table is finite .
  suggest an efficient algo...




-- 
Regards,
G C

-- 
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] direct i online test

2012-08-24 Thread bala bharath
Can u please explain ur code..!!!

-- 
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: INTERFACES VS ABSTRACT

2012-08-24 Thread sulekha metta
@all thanks

On Thu, Aug 23, 2012 at 6:08 PM, vaibhav shukla vaibhav200...@gmail.comwrote:

 Abstract class are used for Abstraction
 Interface are used for Polymorphism

 On Thu, Aug 23, 2012 at 6:06 PM, Amit Tiwari amit.monu...@gmail.comwrote:

 With an abstract class, the subclass of that inheritance tree only can
 and should provide the definitions of the methods. With an interface,
 subclasses of different inheritance tree can also implement the same
 methods. Interface provides a way to separate out and group common behavior
 of different inheritance trees. It is kind of a substitute for the multiple
 inheritance that some other languages provide.

 On Thu, Aug 23, 2012 at 4:59 PM, kings dns.bhar...@gmail.com wrote:

 Dear sulekha,

 when u want a default property to get embedded ie u want to force any
 feature use abstract.
 when u want an additional feature need to be added used interface.

 ex:
 For a car the default things are steering, engine, etc... if u want the
 car to compulsory to have A/c then add it in the abstract
 for a car having ABS is optional include it as an interface where ever u
 think its necessary.


 On Tuesday, 21 August 2012 21:20:45 UTC+5:30, sulekha .m wrote:


 hi all,
   why do we separately need interfaces in java?? we can declare all
 the methods in abstract class as abstract this serves the purpose,then why
 do we have interfaces???
 --
 sulekha metta
 B.E computer science
 osmania university

  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/qI3YhsGoh7wJ.

 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.




 --
 best wishes!!
  Vaibhav

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




-- 
sulekha metta
B.E computer science
osmania university

-- 
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] MS QUESTION

2012-08-24 Thread sulekha metta
Hi all,
 This was asked in microsoft, question is  write a program to
reverse a linked list.and write it's test cases.
i got very few test cases
1) check if the node is null
2) check if there is only one node
3) check if there is any loop in the linked list.
 can any one tell how to reverse a linked list if loop exits? is it
possible?
and  can any one add few more test cases??


--
Regards
sulekha metta
B.E computer science
osmania university

-- 
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] MS QUESTION

2012-08-24 Thread Navin Kumar
Reversing a linked list if loop exists:

1. Find the node from which loop start by any loop finding algorithm in
linked list and keep the position of that node.

2. Unroll the loop i.e. set the last node's(last unrepeating node) next
pointer to NULL.

3. Reverse this singly linked list.

4. Change the last node's next pointer to the node corresponding to the
position we found in step1.

On Thu, Aug 23, 2012 at 8:02 PM, sulekha metta metta.sule...@gmail.comwrote:

 Hi all,
  This was asked in microsoft, question is  write a program to
 reverse a linked list.and write it's test cases.
 i got very few test cases
 1) check if the node is null
 2) check if there is only one node
 3) check if there is any loop in the linked list.
  can any one tell how to reverse a linked list if loop exits? is it
 possible?
 and  can any one add few more test cases??


 --
 Regards
 sulekha metta
 B.E computer science
 osmania university

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



Re: [algogeeks] MS QUESTION

2012-08-24 Thread Navin Kumar
Few more Test cases :

Check for 10 node.
Check for 1 million node
Check for even number of nodes
Check for odd number of nodes...

etc etc...

On Fri, Aug 24, 2012 at 6:25 PM, Navin Kumar algorithm.i...@gmail.comwrote:

 Reversing a linked list if loop exists:

 1. Find the node from which loop start by any loop finding algorithm in
 linked list and keep the position of that node.

 2. Unroll the loop i.e. set the last node's(last unrepeating node) next
 pointer to NULL.

 3. Reverse this singly linked list.

 4. Change the last node's next pointer to the node corresponding to the
 position we found in step1.


 On Thu, Aug 23, 2012 at 8:02 PM, sulekha metta metta.sule...@gmail.comwrote:

 Hi all,
  This was asked in microsoft, question is  write a program to
 reverse a linked list.and write it's test cases.
 i got very few test cases
 1) check if the node is null
 2) check if there is only one node
 3) check if there is any loop in the linked list.
  can any one tell how to reverse a linked list if loop exits? is it
 possible?
 and  can any one add few more test cases??


 --
 Regards
 sulekha metta
 B.E computer science
 osmania university

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



Re: [algogeeks] MS interview

2012-08-24 Thread Navin Kumar
Anagram problem solution using TRIE..

For each word in dictionary we will put it in TRIE as..
 1. First sort the word
 2. Search in trie using sorted word. If search found then we will add the
original word in that TRIE node.
 3. If node node not found then using simple TRIE insertion insert sorted
word with original value stored at  last node.

For example: CAT

sort it = ACT

Search in trie with ACT : if node found then add CAT in that node.

If not found then create node with search key ACT store value CAT.

Time complexity for listing all anagram :

For a given word sort it in O(L) and go to the node by traversing with
sorted word as a search key and will display all the value present at that
node.

Total time complexity : O(L) ,L = length of string


On Fri, Aug 24, 2012 at 11:18 AM, GAURAV CHAWLA togauravcha...@gmail.comwrote:

 Ques  Given a large text... in the text.. there are  gt; , lt; etc
 representing  and .(there can be others like eq;  etc)
the task is to replace such (gt;) with the '' symbol...
 and (lt;) with ''
given the table which have corresponding matches... and
 table is finite .
   suggest an efficient algo...





 --
 Regards,
 G C




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



Re: [algogeeks] INTERFACES VS ABSTRACT

2012-08-24 Thread rajat saxena
Hi All,
I would Like to Answer u,
We implement Multiple Inheritance through Interfaces.That is why only we
need Interfaces because class does not support multiple Inheritance.

On Tue, Aug 21, 2012 at 9:20 PM, sulekha metta metta.sule...@gmail.comwrote:


 hi all,
   why do we separately need interfaces in java?? we can declare all
 the methods in abstract class as abstract this serves the purpose,then why
 do we have interfaces???
 --
 sulekha metta
 B.E computer science
 osmania university

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




-- 
Rajat Saxena

-- 
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] Suggest algo...

2012-08-24 Thread amrit harry
 find the all possible combination of digits ranging 1 to 9 whose sum is 10,
no digit shud be repeated in any combination. 
1234
127
136
145
19
235
28
37
46 

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/K9atBSG79wQJ.
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] direct i online test

2012-08-24 Thread Anurag Gupta
The complexity of above code is exponential.
Here is the simple recurrence for the given problem

F(n) = 2*F(n-1) + F(n-2) + F(n-3)  for n = 4

where F(1) = 2
F(2) = 5
F(3) = 13
precompute the values and each query will then be O(1)

On Thu, Aug 23, 2012 at 8:22 PM, bala bharath bagop...@gmail.com wrote:

 Can u please explain ur code..!!!

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