Interview 1:
Question 1: Similar to Underground system on leetcode
// o 86th Street Station
// |
// |
// o 59th Street Station
// |
// |
// o-----------o Grand Central
// Times Square |
// |
// o 14th Street Station
// every user has their own transit card that's linked to their uuid
// you must swipe when you enter a station AND when you exit
// when you swipe, the subway system gets your uuid, the station, time
// goal: create a function thats calculates the avg time it takes to get between any two stations, based on collective user data
// ex:
// getAverage(86th, Grand Central);
// --> 15min
// 86th at 9am -> Grand Central at 9:10am
// 86th at 10am -> Grand Central at 10:20am
Question 2: Longest substring without repitition
// "abcdef" -> 6
// "abcdaf" -> 5
// "abcdecf"
// "abcdec" // j = 0, i = 5
// "bcdec" // j = 1 i =5
// create function that takes a string and returns the length of the longest substring with no repeating characters
Question 3: Rain Water related
Interview 2:
Question 1: Finding minimum cost to fly candidates to New York and San Francisco, input can have odd number of entries
// Participant List as <costToFlyToNY, costToFlyToSF>:
// <500, 600>,
// <600, 400>,
// <200, 900>,
// <700, 300>
// <400, 200>
// goal find minimum cost
Question 2: Adding two linked lists with most significant digit on the right
// 1->2->3 + 4->5->6 = 5->7->9
// 1->2->3 + 5->6 = 1->7->9
// Definition of singly linked list.
// struct ListNode{
// int val;
// ListNode* next;
// ListNode(int x): val(x), next(NULL) {}
// }
Question 3: Similar to Word Search 2 on Leetcode
I got a reject mail after 2 days.