i think this algo will do...
reverse the given prefix expression
while(!nd of input)
{ if it is operand
push in a stack
if its an operator
{ op1=pop(stack);
op2=pop(stack);
push (op1 op2 operator) on to stack;
}
}
On Sat, Jun 30,
i am not sure if it is possible to change the length of an already declared
array, so i think one might wanna use pointers instead. Allocate memory
dynamically.
On Thu, Jun 28, 2012 at 2:36 PM, deepikaanand swinyanand...@gmail.comwrote:
//Taken from careercup.com
Design the autocomplete
even i dont know how to code in LISP, but this might help
http://obereed.net/queens/algorithm.html
On Fri, Jun 29, 2012 at 5:45 AM, Victor Manuel Grijalva Altamirano
kavic1.mar...@gmail.com wrote:
Hi i need your help, i need to programm the problem eight queens in LISP.
I´m learning LISP, but
find the nth term for the sequence...
3, 8, 12, 17, 22, 28, 35
--
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
Hi I have one year experience and have interview scheduled on monday.
Pease help me with your experience or knowledge regarding questions,
strategy and
any misc aspect.
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To
trie or ternary tree and build stack for the string being entered, keep
distributed hashmap for head/tail queries like cricket, weather, finance
etc various domains etc..
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
On Sat, Jun 30, 2012 at 12:05
@bhaskar himanshu :- can u please explain ur algo for a * ( b + ( ( c - d
) / e ) )
On Sat, Jun 30, 2012 at 11:50 AM, himanshu kansal
himanshukansal...@gmail.com wrote:
i think this algo will do...
reverse the given prefix expression
while(!nd of input)
{ if it is operand
@above
On Thursday, 28 June 2012 04:05:12 UTC+5:30, Navin Kumar wrote:
Design an algorithm that, given a list of n elements in an array, finds
all the elements that appear more than n/3 times in the list. The algorithm
should run in linear time
( n =0 ).
You are expected to use
@Dave :- a minor change
Initially, decrement the end pointer till it points to positive number,
Now end points to the last negative number.
Now,
If current is negative , increment current
If current is positive , swap it with the element at end and decrement
current and end both
If current =
An unbalanced BST can be converted to a balanced BST in following 2-steps.
1:- Convert the tree to sorted circular doubly linked list.
http://www.leetcode.com/2010/11/convert-binary-search-tree-bst-to.html
The left children points to previous element and right children points
to next
I think no need to reverse the string,following program is giving me
correct o/p.Although right now this program will work only for binary
operator,for unary add extra condition
main()
{
char str[100];
int i=0;
int digit;
scanf(%s,str);
while(str[i])
{
if(isdigit(str[i]))
{
@navin : +1
On 6/30/12, Navin Gupta navin.nit...@gmail.com wrote:
An unbalanced BST can be converted to a balanced BST in following 2-steps.
1:- Convert the tree to sorted circular doubly linked list.
http://www.leetcode.com/2010/11/convert-binary-search-tree-bst-to.html
The left children
these are asked for which profyl??developer or white box??
On Sat, Jun 30, 2012 at 8:03 PM, Amol Sharma amolsharm...@gmail.com wrote:
@sarthak :
in your first solution aren't you using nrows+1 malloc's ?
second solution is good using 1 malloc.
--
Amol Sharma
Final Year Student
Computer
i dont knw read it in some paper.. most prob developer.
On Sat, Jun 30, 2012 at 9:56 PM, rahul sharma rahul23111...@gmail.comwrote:
these are asked for which profyl??developer or white box??
On Sat, Jun 30, 2012 at 8:03 PM, Amol Sharma amolsharm...@gmail.comwrote:
@sarthak :
Use an array count[26][2].
Here first col of each row represents the position of first instance of the
alphabet,if any, else -1.
and second col of each row represents the position of last repeated
instance of the alphabet, if any, else -1.
Now traverse the count array to find the row having
i have fixed your code but it is alwayz better to use recursive
function for creating trie.
i have wrote my own recursive function to create TRIE... you can
understand the same bcozz iterative one make thing unnecessary
complicated.
here check the code link :-
http://ideone.com/6HhFZ
have
@Navin: If I am correctly executing your algorithm on the data in the
original posting, {-1,5,3,-8,4,-6,9}, I get {-1,-6,-8,4,3,5,9}, when the
correct answer is {-1,-8,-6,5,3,4,9}. The array contains the correct
numbers, but the order of the positive numbers and the order of the negtive
Given matrix(screen black n white)..where 1 represents black dot and
0=white.
there can b many images/objects in it..return list of coordinates for each
obkect..(Hint do BFS)
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
18 matches
Mail list logo