Skip to content

Interview Experience 78

sggarg edited this page Sep 12, 2017 · 1 revision

#2017

##SoftwareEngineer

  1. Qualifying Round - Coding round held on Co-Cubes.

3 questions were there.

1st question

Given 2 integers 'n' & 'k'(n > k). Find multiple of 'k' which is nearest to n eg:

  1. n = 67, k = 8

ans = 64 [8 * 8]

  1. n = 29, k = 8

ans = 32(8 * 4)

2nd question

Given 2 link lists(sorted). Return a link list containing common elements of the 2 link list. Constraint - No extra space allowed. Modify the original link list and return

eg

LinkList 1 - 1->3->4->7->11->NULL

LinkList 2 - 4->5->9->11->NULL

Return 4->11->NULL

3rd question

Given a link list. Modify the original link list in such a manner such that all odd numbered nodes appear first followed even numbered in reverse order. Make sure that you can't use extra space.

eg -

LinkList - 1->2->3->4->5->6->7->NULL

return 1->3->5->7->6->4->2->NULL

  1. Group Fly Round - Held in IIIT Delhi - A single coding question was given to be solved on paper. Focus was time complexity, neat & clean presentation, how well you can write code

Given an array of rectangles(in Cartesian plane), find the largest rectangle which is present in all rectangles of the array. If no such rectangle is there, return NULL

Representation of rectangle (sides of the rectangle are parallel to x & y axis)

struct Rectangle { int bottom_x, bottom_y; int width, height; };

Around 30 students qualified this round out of 150 students (of about 20 colleges)

  1. 1st Technical Round - Discussion on projects.

Coding question - Given a link list. Delete all ith nodes where i = keys of all nodes in a link list

eg

link list ---- 1->3->4->7->8->NULL

Delete 1st node(which is 1), 3rd node(which is 4), 4th node(which is 7), 7th node(Not present, so do nothing), 8th node(Not present, so do nothing)

Return 3->8->NULL

Clone this wiki locally