Qualtrics[Phone Round]
- Result
- Ongoing
- Posted
- 11 Jan 2022
Summary
I had a phone interview with Qualtrics where I was asked to solve a sliding window minimum problem, requiring an O(n) solution.
How it went
I recently had a phone interview with Qualtrics. The interviewer presented me with a challenging data structures and algorithms question. I was tasked with finding the minimum element within a continuous range 'k' across a given integer array 'nums' and was expected to solve it in O(n) time complexity. I believe I explained my approach clearly.
Questions asked (1)
- 01
Sliding Window Minimum
Data Structures & Algorithms · Medium
Given an integer array
numsand a rangek, output the minimum element withinkcontinuous ranges. The solution should be solved in O(n) time.Example:
Input: nums = { 1,3,5,7,2,6,4,9}, k = 3 Output: {1,3,2,2,2,4}Explanation of example:
min{1,3,5} = 1min{3,5,7} = 3min{5,7,2} = 2- and so on...