Many times in interviews for a data science/ tech role, you will have to answer programming (data structures and algorithms) questions. The reason is that algorithms/data structures commonly occur in programming, and they test the ability to think computationally and solve problems using programming - knowledge of data science/stats/maths is good but in addition you need to be able to program.

Theory

Books

These are books SPECIFICALLY for algos/data structures training for interviews

Cracking the Coding Interview: https://www.amazon.co.uk/Cracking-Coding-Interview-6th-Programming/dp/0984782850/

Elements of Programming Interviews:

These are textbooks for a standard Data Structures and Algorithms course (e.g. MA314)

Introduction to Algorithms (commonly referred to as the "CLRS" book): https://www.amazon.co.uk/Introduction-Algorithms-Thomas-H-Cormen/dp/0262033844/

Grokking Algorithms: https://www.amazon.co.uk/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/

Algorithms: https://www.amazon.co.uk/Algorithms-Robert-Sedgewick/dp/032157351X/

Steven Skiena https://www.amazon.co.uk/gp/product/0387948600/

These are geared towards competitive programming, but are quite relevant and useful

Competitive Programming 3 : https://www.amazon.com/Competitive-Programming-3rd-Steven-Halim/dp/B00FG8MNN8

Guide to Competitive Programming : https://www.amazon.co.uk/Guide-Competitive-Programming-Algorithms-Undergraduate/dp/3030393569/

Data Structures to Know:

  • Arrays
  • Linked Lists, Stacks, Queues
  • Tree (Tree, Binary Tree, Binary Search Tree, Redß-Black Tree, etc.)
  • Heap
  • Hash Table
  • Trie
  • Graphs (both directed and undirected)

Algorithms to Know

  • Sorting: Bubble Sort, Merge Sort, Quick Sort, Radix/Bucket Sort, Heapsort

  • Graph Traversals: Depth First Search, Breadth First Search

Exercises

The only way to get better is to expose yourself to more exercises. There are tons of platforms (Leetcode, Hackerrank), and competitions available to do so

Going through https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU or Project Euler https://projecteuler.net/ could be a good start

https://jeremyaguilon.me/blog/ranking_interview_questions_by_cram_score

08/11/2020