CrowdStrike | OA | Slot Machines
Anonymous User
9403

Since CrowdStrike sent out a Hackerrank without having an intent to hire interns this late I decided to post the questions. Hopefully this helps the next intern class!
LinkedLists are not suitable to implement

  1. polynomial manipulation
  2. selection sort
  3. radix sort
  4. binary search
    Thoughts? I say 4
    Strongly Connected Graph Question
    A directed graph has three points in it. It has three Nodes (A, B, C) and three edges such that there is an edge between A, B and A, C, and B, C. You need to mark directions on the edges. For example, does A go to B, or B to A?
  5. 6
  6. 1
  7. 2
  8. 0
    Thoughts? I say 2
    Time of Search a Linked List
    time complexity of find an element in a linked list of length n
  9. O(n^3)
  10. O(n^ 2)
  11. O(logn)
  12. O(1)
  13. O(n)
    Thoughts? I say 5

Coding:

  1. Given a List represented as
    Input: Louis IX, Louis VIII
    Output: [Louis VIII, Louis IX]
    sort by name first then roman numeral

  2. Given a linkedList where each node has a 0 or 1 convert it to long decimal value.
    e.g. 0 -> 1 -> 0 -> 0 -> 1 -> 1 -> /
    return 19

  3. Solt Machine 2.0
    Given: n = 4
    spins
    [7, 1, 2]
    [2, 4, 6]
    [3 ,6 ,5]
    [3, 1, 2]
    We remove the largest value in each row, and add the max to the resutl.
    E.g. Take 7, remove from each row 7, 6, 6, 3
    now we have
    [1, 2]
    [2, 4,]
    [3, 5]
    [1, 2]
    take 5, remove from each row 2, 4, 5, 2
    [1]
    [2]
    [3]
    [1]
    take 3 remove 1, 2, 5, 1
    answer is 7 + 5 + 3 = 15, return 15
    Example 2:
    1 3 7
    1 1 5
    3 6 4
    1 1 5
    7 2 4
    take 7 and remove max from each row
    1 3
    1 1
    3 4
    1 1
    2 4
    take 4 and remove max from each row
    1
    1
    3
    1
    2
    take 3 and remove max from each row
    7 + 3 + 4 = 14, return 14
    Thoughts? I used a list of maxPQs.

Comments (3)