Skip to content

Instantly share code, notes, and snippets.

@vladkotu
Created May 26, 2017 16:35
Show Gist options
  • Save vladkotu/9b63ab16f23dd521e100e52dcfad8451 to your computer and use it in GitHub Desktop.
Save vladkotu/9b63ab16f23dd521e100e52dcfad8451 to your computer and use it in GitHub Desktop.

Revisions

  1. Vlad Kotushenko created this gist May 26, 2017.
    24 changes: 24 additions & 0 deletions interview-tasks-memories.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # tasks from interview

    ## transactions
    Given intup data (transactions)
    ```js
    const transactions = [
    ['usd', 'buy', 10000],
    ['usd', 'sell', 5000],
    ['gbp', 'buy', 9000],
    ['eur', 'sell', 7000],
    ['uah', 'buy', 10000],
    ['usd', 'sell', 25000],
    ];
    ```
    Implement function thats return
    ```js
    const result = {
    usd: [10000, 30000],
    gbp: [9000, 0],
    eur: [0, 7000],
    uah: [10000, 0],
    }
    ```