) --search up, down, left and right for words
any better way?
--
--
Thanks and Regards,
Raghavan KL
--
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
.
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
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
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
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
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:
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
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
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
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
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
@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
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
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
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
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
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
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
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
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
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
,
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
(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
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
://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
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
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
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
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
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++)
{
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
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.
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
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
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
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
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
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)
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
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;
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
42 matches
Mail list logo