Preparing for an interview? Check out Cracking the Coding Interview
Published on

Meta phone screen | Passed

Author
  • Shared Anonymously

Question 1:
Similiar Leetcode Questions:
88. Merge Sorted Array
23. Merge k Sorted Lists

// Implement a function to merge 3 sorted integer arrays into a single sorted array. Remove duplicates in the resulting array.  
  
  
// A: [-100, -10, -1, -1, 0, 0, 0, 1, 1, 5]  
// B: [-90, -2, 0, 0, 0, 3, 5, 5]  
// C: [-20, -1, 0, 0, 1, 4, 4]  
  
  
// Output: [-100, -90, -20, -10, -2, -1, 0, 1, 3, 4, 5]  
  

Question 2:
Same question: https://leetcode.com/problems/binary-tree-vertical-order-traversal/description/
Similar question: https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree/

// Given the root of a binary tree containing integers, print each column from left to right, and within each column print the values from top to bottom.  
// Input:  
//       6  
//      / \\  
//     3   4  
//    /   / \\  
//   5   1   0  
//    \\     /  
//     2   8  
//    / \\  
//   9   7  
  
  
  
  
// Output:  
// 5 9 3 2 6 1 7 4 8 0  
  
  
 //     1  
 //    / \\  
 //   2   6  
 //  /   /  
 // 3   7  
 //  \\  
 //   4  
 //    \\  
 //     5  
  
  
 //{0: [1, 7, 5], -1: {2, 4}, -2: [3], }  
//minAndMaxCol[] = [min, max]  
  

Conclusion passed the onsite and reached onsite.

ReportMark as Helpful