Re: [algogeeks] Re: Find all words in given character Matrix

2013-01-18 Thread Raghavan
) --search up, down, left and right for words any better way? -- -- Thanks and Regards, Raghavan KL --

[algogeeks] Google Interview question - Python

2012-11-01 Thread Raghavan
I got this question set in google interview, do any one have some knowledge how to do this, One way of imagining a lazy stream implementation in python is any class that implements the method: popNext() which returns the next element of the stream, if any, otherwise None. 1. Write the following

Re: [algogeeks] INTERVIEW QUESTION

2012-10-26 Thread Raghavan
. 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. -- Thanks and Regards, Raghavan KL -- You received

Re: [algogeeks] Missing Number Problem

2012-10-05 Thread Raghavan
options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards, Raghavan KL -- 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

[algogeeks] Need links for Problem solving interview questions(non DS and algorithmic) probably with how to reach a solution

2012-07-11 Thread raghavan M
hi I am looking for some web links where i can find problem solving questions and method that one can use to solve the problems that are asked in interviews.Please let me know if you came across one. Thanks Rag -- You received this message because you are subscribed to the Google Groups

[algogeeks] MS Question: Segregrate positive and negative nos in array without changing order

2012-06-29 Thread raghavan M
Hi Question as in subject *No extra space (can use one extra space)-O(1) max *No order change allowed example: input : 1,-5,2,10,-100,-2 output: -5,-10,-100,1,2 input : -1,-5,10,11,15,-500,200,-10 output : -1,-5,-10,-500,-10,10,11,15 Thanks Raghavn -- You received this message because you

Re: [algogeeks] MS Question: Segregrate positive and negative nos in array without changing order

2012-06-29 Thread raghavan M
The main idea of this question is *not to change order of occurrence.Dutch National flag other swapping like quick sort will change the order of occurrence of number try yourself with simple example for proof. From: Ravi Ranjan ravi.cool2...@gmail.com To:

Re: [algogeeks] MS Question: Segregrate positive and negative nos in array without changing order

2012-06-29 Thread raghavan M
of a previous post.Kindly refer to that post. Saurabh Singh B.Tech (Computer Science) MNNIT  blog:geekinessthecoolway.blogspot.com On Fri, Jun 29, 2012 at 10:41 AM, raghavan M peacelover1987...@yahoo.co.in wrote: Hi Question as in subject *No extra space (can use one extra space)-O(1) max

Re: [algogeeks] trie display

2012-06-28 Thread raghavan M
tire will always contain the link to all its children.This problem is just printing out the children once the key is fully reached. ie., search for abc in trie print all the children of c node. Raghavan From: deepikaanand swinyanand...@gmail.com

Re: [algogeeks] Adobe interview question

2012-06-22 Thread raghavan M
Make all constructors private. From: himanshu kansal himanshukansal...@gmail.com To: Algorithm Geeks algogeeks@googlegroups.com Sent: Friday, 22 June 2012 1:44 PM Subject: [algogeeks] Adobe interview question How will u implement an abstract class in c++ w/o

Re: [algogeeks] Re: Run Length Decoding... inplace

2012-03-25 Thread raghavan M
by 1  From: atul anand atul.87fri...@gmail.com To: algogeeks@googlegroups.com Sent: Saturday, 24 March 2012 4:32 PM Subject: Re: [algogeeks] Re: Run Length Decoding... inplace @raghavan: wont work...take input as a1b1c4...it willl fail. read prev comment

Re: [algogeeks] Re: Run Length Decoding... inplace

2012-03-24 Thread raghavan M
For sake of in-place Instead of doing it from the Start we can do it from the end in which case, the data precision wont be lost. Eg: a1b2c3d4 start with d4 a1b2c3 now in next loop a1b2ccc- here we have to do a)reallocation and b)copy the last 3 from next  one it is more swaps :D 

Re: [algogeeks] Obstacle Avoidance

2011-12-28 Thread Raghavan
@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. -- Thanks and Regards, Raghavan KL -- You received this message because you are subscribed

[algogeeks] Exclusively For You

2011-12-15 Thread divya raghavan
I like this offer http://www.chrisbeck.de/inf.php It could be interesting for you, too -- 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

[algogeeks] Find square root a number

2011-08-30 Thread Raghavan
how to design this logic effectively? double squareRoot(int num){ } -- Thanks and Regards, Raghavan KL -- 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

Re: [algogeeks] Any ideas on project on data mining ??

2011-08-30 Thread Raghavan
options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards, Raghavan KL -- 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

Re: [algogeeks] 2 Binary trees are isomorphic?

2011-08-27 Thread Raghavan
options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards, Raghavan KL -- 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

Re: [algogeeks] Re: Given an array, find out whether there exists a triplet which can form sides of triangle.

2011-08-23 Thread Raghavan
this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards, Raghavan KL -- 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

Re: [algogeeks] how to find median of two sorted arrays

2011-08-19 Thread Raghavan
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. -- Thanks and Regards, Raghavan KL -- You received this message because you are subscribed

[algogeeks] Max possible numbers in incremental order

2011-08-17 Thread Raghavan
index. 2. It can skip any numbers which comes in between the array (here we skipped {7, 1, 6}). how to do this? -- Thanks and Regards, Raghavan KL -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks

Re: [algogeeks] Max possible numbers in incremental order

2011-08-17 Thread Raghavan
of Computer Engineering National Institute of Technology Kurukshetra Kurukshetra - 136119 Haryana, India On Wed, Aug 17, 2011 at 8:26 AM, Raghavan its...@gmail.com wrote: Given an unsorted array (A), find the max size of set in which the numbers should be in the incremental order

Re: [algogeeks] array question

2011-08-16 Thread Raghavan
at http://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards, Raghavan KL -- 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

Re: [algogeeks] array question

2011-08-16 Thread Raghavan
, Raghavan KL -- 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

Re: [algogeeks] array question

2011-08-16 Thread Raghavan
(1); On Tue, Aug 16, 2011 at 3:20 PM, MAC macatad...@gmail.com wrote: The question needed o(1) space and o(n) time ... o(n) map approach is obviously fine but space is taken up ... On Tue, Aug 16, 2011 at 2:38 PM, Raghavan its...@gmail.com wrote: @sukran: If you were asking for the map

[algogeeks] how to find triangular property

2011-08-16 Thread Raghavan
A[2] = 5 A[3] = 1A[4] = 8A[5] = 20 Triplet (0, 2, 4) is triangular. -- Thanks and Regards, Raghavan KL -- 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] String Question

2011-08-13 Thread Raghavan
://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards, Raghavan KL -- 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

Re: [algogeeks] Need Pointers for dynamic programming concept problems

2011-08-13 Thread Raghavan
this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Thanks and Regards, Raghavan KL -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

[algogeeks] Remove spaces

2011-08-12 Thread Raghavan
A huge paragraph has irregular spaces between the words, how to effectively we can make everything to single space. Example : My name is xyz Should to converted to : My name is xyz -- Thanks and regards, Raghavan.K.L http://in.linkedin.com/in/raghavankl -- You received this message

Re: [algogeeks] Re: Problems on Linked List

2011-08-12 Thread Raghavan
First question: - .Read the data from the first list and put it in a stack - Traverse the next list and compare by reading elements from the stack - This would solve it Second question: - Take an list like 1-2--3-4 - If you are given with 2, juz copy the value and reference of

Re: [algogeeks] MS question

2011-08-09 Thread Raghavan
Mapchar,int charCountMap = new HashMap(); for(String char : characters.length){ if(charCountMap.containsKey(char){ charCountMap.get(char)++; }else{ charCountMap.put(char,1); } } later read the map and print the count and key it might suffice. On Tue, Aug 9, 2011 at 6:37 PM, ankit sambyal

Re: [algogeeks] Paypal interview Questions

2011-08-06 Thread Raghavan
q2: Maintain a map it would solve the issue. On Sat, Aug 6, 2011 at 12:28 PM, dilip makwana dilipmakwa...@gmail.comwrote: FOR Q2 int i, j; /* new length of modified array */ int NewLength = 1; for(i=1; i Length; i++){ for(j=0; j NewLength ; j++) {

Re: [algogeeks] pls help

2011-08-05 Thread Raghavan
A *trie *could help here where the number of children for each node matches the required length. On Fri, Aug 5, 2011 at 12:20 PM, Kamakshii Aggarwal kamakshi...@gmail.comwrote: given a set of letters and a length N, produce all possible output.(Not permutation). For example, give the letter

Re: [algogeeks] Re: GOOGLE QUESTION

2011-07-08 Thread divya raghavan
since its a phone number storing problem, you can sort the numbers and store the differences. That way you can generate the required number on the go On Thu, Jun 30, 2011 at 4:39 AM, juver++ avpostni...@gmail.com wrote: @Navneet Please read problem again - it is about memory efficient storing.

Re: [algogeeks] Google Search by Image

2011-06-21 Thread Raghavan
An idea which strikes to mind is, 1.Initially to form a map based on the text and all related text to it.[text,images]map 2.Also make a bitwise manipulation of every image and relate the texts to it.[imagebitwise,texts] map 3.If a image is put forth for search, check the texts from

[algogeeks] How to form a tree based on api which states the property of each node

2011-06-15 Thread Raghavan
There is a tree which denotes 4 directions, Node direction{ direction *side1,*side2,*side3,*side4; }; makeTree(){ direction *tree; getdirection(tree,1); getdirection(tree-right,2); getdirection(tree-left,1); /* how to form such a tree root side1 side2 side3 side4 side1

[algogeeks] Finding shortest path in 4-ary tree

2011-06-14 Thread Raghavan
Hi, How to find the shortest path in a 4-ary tree in an optimal way? Node tree{ Node *left,*right,*top,*bottom; int val; }; Let the above given be the tree structure. -- Thanks and regards, Raghavan.K.L http://in.linkedin.com/in/raghavankl -- You received this message because you are

Re: [algogeeks] Finding shortest path in 4-ary tree

2011-06-14 Thread Raghavan
at 5:37 PM, Raghavan its...@gmail.com wrote: Hi, How to find the shortest path in a 4-ary tree in an optimal way? Node tree{ Node *left,*right,*top,*bottom; int val; }; Let the above given be the tree structure. -- Thanks and regards, Raghavan.K.L http://in.linkedin.com

[algogeeks] Re: Lucky numbers

2009-01-06 Thread Vijay Venkat Raghavan N
from above. 1 3 7 13 19 27 27 is not prime and a lucky number. So the method is fine. Pratyush Tewari On Mon, Jan 5, 2009 at 12:30 AM, Vijay Venkat Raghavan N mydeares...@gmail.com wrote: Guys this is wrong. Lucky number is basically a prime number if you observe the definition

[algogeeks] Re: DataStructure - Push,Pop Find_Min in O(1)

2006-03-25 Thread Vijay Venkat Raghavan N
extract_min not possible cos that wud been a brand new sorting algorithms that runs in O(n) time.On 3/25/06, Balaji Gopalan [EMAIL PROTECTED] wrote:hithe extension of this prob asks whether one more function extract_min() (which returns and deletes the current minimum ) can be implemented in O(1)

[algogeeks] Re: determine whether a matrix is rearrangeable

2006-03-17 Thread Vijay Venkat Raghavan N
hi, well am not really sure about this stuff, but i guess if theres a 1 in each row and each coloum initially, then it is rearrangeable. i am not able to think of a rigorous proof as of now. -VijayOn 3/18/06, kool_guy [EMAIL PROTECTED] wrote: Let A be a n by n matrix.A is rearrangeable if there

[algogeeks] Re: Comparing two mathematical expressions

2005-12-14 Thread Vijay Venkat Raghavan N
Hi folks, Lets do a lexicographical sorting of the _expression_ like this: Exp Lexico (E1 Opr E2) { newE1= Lexico(E1); newE2= Lexico(E2); if( Opr is NON Commutative ) return newE1 opr newE2; //If Opr is Commutative If newE1 lexicographicallysmallerthan newE2 return newE1 Opr newE2;

[algogeeks] Re: Geometry problems

2005-11-30 Thread Vijay Venkat Raghavan N
hi, i have an answer to ur first question. it is n^2 lgn, but its quite a long procedure and I am sure there must be somethng better. 1. set up and nXn matrix, where the entry at (i,j) is the directed slope between points i and j. this is n^2 2. sort each row of this matrix. sorting one row is