Status: 3rd year undergrad, BS Computer Engieering - Alexandria University - Egypt
Position: Software Engineering Intern at Microsoft Advanced Technology Labs
Location: Cairo, Egypt
There was a long filteration process till reaching the interview stage:
1. Check if the parentheses are balanced in a string or not.
2. Given 2 arrays of equal size one containing the values and
the corresponding entry in the other array contains the order of the node,
you are required to rearange the values according to the order such that
the absolute difference between each 2 consecutive nodes are less than k
(k is a given integer).The first interview
Given
1. array of integers
2. integer k
you can only put + or - between any 2 consecutive elements till reaching the
end of the array, if the total sum of the elements is divisible by k return true,
else repeat with another combination till all the combinations are finished or
the answer is found.
You are also required to analyze the complexity of your algorithm
ex [1, 2, 3] k = 2
1
+/ \-
2 2
+/ \- +/ \-
3 3 3 3
The second interview
It was a couple of linkedlist questions
The first one: I was required to detect if 2 linkedlists are intersecting and calculate
the complexity of the algorithm.
The second one: I was required to detect a loop in a linkedlist and also detect
the node of the start of the loop, there was an extra question to do a mathematical
proof for the method I used which was Floyid's cycle detection algorithm.