NVIDIA Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
5
of 5 vote

geeksforgeeks.org/?p=2405

- Rahul D March 20, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 2 vote

It can be done in this way
1. Find out the length of both lists.
2. Subtract small one from longer - This will bring both in same point to traverse
3. Now start traversing both & check for pointers. If they both are same at any point of time, they are intersecting. Else they are not

- Shail March 21, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

traverse the lists from head to tail and put the node pointers of each lists in stacks
ListA -> StackA
ListB -> StackB

(1) if they intersect, then the top element of both stacks will be same
(2) if (1) is true, keep popping up till the elements of stack have same value (node addresses) the last popped will be the intersection point
Eg- 100 is the last matched and popped node in the following
2--3--4--5--6--7--
\--- 100--200--300
20--30--40--50-- /

stackA 300--200--100--7--6-- ...--2
stackB 300--200--100--50--40--30--20

- abhityagi85 January 05, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Nice solution!

- Dsk September 23, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

little unclear about question. are you asking 'intersection of two linked lists' or 'loop in a single list'?

- someone March 18, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think it can be done as follows.
1) First linked list - Insert all the references in HashTable.
2) Second linked list - traverse list and check each node reference if present in HashTable if yes that's the intersection point.

This approach is fast but space required is more.

- ssk March 19, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

what do "flags" mean?

- lyons March 19, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i didnt get the logic of the program.So please let me know or mail me the logic for this problem on my mail id.My mail id is sfsyedfaisal@gmail.com

Thanking you,
S.M.Faisal

- s.m.faisal April 15, 2013 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More