Yandex | Phone Screen | Normalize String & Sliding Window Minimum

I have 1 hour skype interview question in Yandex.

The questions were:

  1. Complexity and implementetaion details of sorting algorithms (qsort, heapsort, mergesort). Complexity of data structures (heap, trees).

  2. You are given a string -> normalize it.
    Example:

    Input: "good       string                   "
    Output: "good string"
  3. You are given a function int push(int) -> return the minimum value in a window of size k.
    Example:

    [1,2,3,4,5,6,7,8,9], k = 3
    push 1: {1} -> 1
    push 2: {1,2} -> 1
    push 3: {1,2,3} -> 1
    push 4: {2,3,4} -> 2
    push 5: {3,4,5} -> 3

    Vatiation of https://leetcode.com/problems/sliding-window-maximum

Waiting for the onsite interview.

Comments (4)