## Alpha

Top K Frequent Elements
Binary Search Tree Iterator
Edit Distance
LFU Cache
Basic Calculator III

Design Tic-Tac-Toe
Last Substring in Lexicographical Order
Design HashMap
Rotate Image
*Interleaving String

## Beta

### EQ-1

Given a non-empty array of integers, return the k most frequent elements.

### EQ-2

Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling `next()` will return the next smallest number in the BST.

### EQ-3

Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
You have the following 3 operations permitted on a word:

• Insert a character
• Delete a character
• Replace a character

### EQ-4

Design and implement a data structure for `Least Frequently Used (LFU)` cache. It should support the following operations: `get` and `put`.
`get(key)` - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.
`put(key, value)` - Set or insert the value if the key is not already present. When the cache reaches its capacity, it should invalidate the least frequently used item before inserting a new item. For the purpose of this problem, when there is a tie (i.e., two or more keys that have the same frequency), the least recently used key would be evicted.
Note that the number of times an item is used is the number of calls to the `get` and `put` functions for that item since it was inserted. This number is set to zero when the item is removed.

### EQ-5

Implement a basic calculator to evaluate a simple expression string.
The expression string may contain open `(` and closing parentheses `)`, the plus `+` or minus sign `-`, non-negative integers and empty spaces. The expression string contains only non-negative integers, `+, -, *, /` operators , open `(` and closing parentheses `)` and empty spaces.
The integer division should truncate toward zero.
You may assume that the given expression is always valid. All intermediate results will be in the range of `[-2147483648, 2147483647]`.

### EQ-6

Design a Tic-tac-toe game that is played between two players on a n x n grid.
You may assume the following rules:

• A move is guaranteed to be valid and is placed on an empty block.
• Once a winning condition is reached, no more moves is allowed.
• A player who succeeds in placing n of their marks in a horizontal, vertical, or diagonal row wins the game.

### EQ-7

Given a string `s`, return the last substring of `s` in lexicographical order.

### EQ-9

You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).

### EQ-10 *

Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
`Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac" Output: true`
`Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbbaccc" Output: false`

Feb 11, 2020
La Jolla, CA

## Omega

https://leetcode.com/