Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 678 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 678 Bytes

A collection of technical interview coding challenges

  1. Write a function that:
    • takes two arguments: an array of strings and an integer k
    • returns k most frequent strings in the given array (in order of frequency).

For example, input of ['a', 'b', 'a', 'c', 'a', 'b'], k = 1 should return ['a']. Same array and k = 2 should return ['a', 'b'].

  1. Write an interface for a vending machine that has following functions:
    1. receive coins
    2. select item
    3. give out item
    4. give out change in coins

Part one: write a class with methods/fields declarations, don't implement the methods' bodies.

Part two: implement the method for giving out change.