Data Structures & Algorithms  List
 Stack
 Hashmap
 Hashtable
 tree
 graph
Discrete Math 101
Machine Learning  supervised learning
 unsupervised learning
 overfitting
 boosting
 regularization.
 Experience with common learning algorithms such as
 logistic regression
 decision trees
 SVM
 PCA
 kmeans
 XGBDT
 XGBoost
Domains Ranking / Personalization /
NLP
Word embedding
Parse tree
Part of speech
LSTM
Attention
bidirectional beam search
Beam search uses breadthfirst search to build its search tree. At each level of the tree, it generates all successors of the states at the current level, sorting them in increasing order of heuristic cost.[2] However, it only stores a predetermined number, β, of best states at each level (called the beam width). Only those states are expanded next.
Deep Learning Deep Learning/Neural Networks Knowledge of Deep Learning algorithms inclusive of examples and features. Understanding of Convolutional Neural Network, Recurrent Neural Networks, optimization algorithms (Stochastic Gradient Descent, Backpropagation through time) and other aspects of the design/training of those networks
Reinforcement Learning Knowledge of an area of machine learning about sequential decision making, in which an agent takes actions in an environment, trying to maximize the sum of expected rewards. This includes sequential environment modeling and control. This requires knowledge of the main concepts (Markov Decision Processes, value functions, Bellman equations, policy gradient, Qlearning, and actorcritic.) Be able to cast concrete problems into a RL formulation.
The Large Scale Design Interview In this interview, you should be able to combine your current Machine Learning knowledge, theories, experience and judgement toward solving a realworld engineering problem. Questions are generally open ended so you can dive deeper into the solution. It is important to design a solution thinking about data analysis, potential use cases, the users, scalability, limitations and tradeoffs.
Array Contiguous memory block, items of same size.
Row major, Column major
item at (3,4): array_address + (31) * ItemsInEachColumn + 4
Constant time to access each element
Add/Remove
to beginning and middle is O(n)
to end is O(1)
Linked List
Stack (LIFO) Implementaiton
With Arrays
Just keep count of how many items in array
With Lists
Always keep pointer to top of the stack
Example
Balanced Brackets
Input: A string str consisting of ‘(‘, ‘)’, ‘[‘,‘]’ characters.
Output: Return whether or not the string’s parentheses and square brackets are balanced.
Code
IsBalanced(str ) Stack stack for char in str: if char in [‘(‘, ‘[‘]: stack.Push(char ) else: if stack.Empty(): return False top ← stack.Pop() if (top = ‘[‘ and char != ‘]’) or (top = ‘(‘ and char != ‘)’): return False return stack.Empty()
Queue (FIFO)
Using
Linked lists: head and tail pointers
Array:
read: Array index to read from
write: Array index to write to
Empty if read = write
Full if write + 1 % length = read
Tree
Heap Sort:
Heap sort is best implemented as a binary tree within an array structure. good link
Maxheap:
Start with an empty array. parent/child indexing is as follows: if parent is at k, left child is 2k+1 and right child is 2k+2
For each new number, if bigger than parent, swap it with it.
If swapped keep swapping up to the top
Heap Sort:
Create max heap Remove top node, put the last item in its place.
Complexity:
Complexity: maxiheap takes O(log n) for each item. there are n calls to max heap > O(n log n). To create max heap. + To sort there is log n shifts for each item, there are n items > n log n = n log n
