Open In App

WhiteHat Jr Interview Experience

Last Updated : 21 May, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

Telephonic Interview Process due to COVID-19 

Round 1:   Technical (DS & Algorithms) 

The interviewer asked  2 questions, one was from the Arrays & the other was Graph Traversal. 
 

  1. Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. Assume that there is only one duplicate number, find the duplicate one. 
    Constraints: 
    • You must not modify the array (assume the array is read only).
    • You must use only constant, O(1) extra space.
    • Your runtime complexity should be O(n).
    • There is only one duplicate number in the array, but it could be repeated more than once.
  2. Print all the possible paths from the top left to the bottom right of a m*n matrix. 
    Constraints: 
    • From each cell, you can either move only to right or down.
    • The difference between the previous and next element should be equal.

 
 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads