pga
BAN USER
Questions (1)
Forum Posts (1)
Comments (4)
Reputation 0
- 0of 0 votes
Answersinterviewer, do you know what is an expression tree?.I said No.Than he explained.
- pga in United States
He asked me to computer the value of the expression tree.
%
1 +
5 8
How to solve this. It took me 30 minutes to get the answer?.| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Data Structures
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
I am going to explain the basic concept, coding it should be easy, to reverse a list such as
1->2->3->4.
Curr=Head;
Last=Head;
1).Get a pointer to the last element, by traversing till the end
2). While(Curr!=Last)
4). temp = curr;
5). If Last.Next!=null, than temp.next=Last.Next;
6).Last.Next = Temp;
7).End While
8)Head=Last;
1-2-3-4
Last = 4;
2-3-4-1
3-4-2-1
4-3-2-1
Head = 4
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
If you don't think you can afford the higher education than go for the job, but otherwise by all means go for masters.
- pga July 18, 2012