Qualtrics[Phone Round]

qualtrics logo
qualtrics
Ongoing
January 11, 20222 reads

Summary

I had a phone interview with Qualtrics where I was asked to solve a sliding window minimum problem, requiring an O(n) solution.

Full Experience

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.

Interview Questions (1)

Q1
Sliding Window Minimum
Data Structures & AlgorithmsMedium

Given an integer array nums and a range k, output the minimum element within k continuous 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} = 1
  • min{3,5,7} = 3
  • min{5,7,2} = 2
  • and so on...
Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!