Software Development Interview Questions

36,968 software development interview questions shared by candidates

Given a linked list with three fields: a data field, a next field and a random pointer field (which is a field that points to null or to an element in the linked list) write a function to return a copy of the linked list without destructively modifying the original linked list
avatar

Software Development Engineering Intern

Interviewed at Microsoft

4
Dec 18, 2014

Given a linked list with three fields: a data field, a next field and a random pointer field (which is a field that points to null or to an element in the linked list) write a function to return a copy of the linked list without destructively modifying the original linked list

You've a singly linked list where every node in the list has a field "random" which points to other node in the same list. Write a function to clone this list (create a new copy of the same). Don't use extra space (just the pointer variables are fine).
avatar

Software Development Engineer I

Interviewed at Microsoft

4
Aug 17, 2012

You've a singly linked list where every node in the list has a field "random" which points to other node in the same list. Write a function to clone this list (create a new copy of the same). Don't use extra space (just the pointer variables are fine).

Viewing 371 - 380 interview questions

Glassdoor has 36,968 interview questions and reports from Software development interviews. Prepare for your interview. Get hired. Love your job.