Over the years, I've had many interview coding questions thrown at me. Some of them I could answer well. Others, either I could not answer or my mind just went blank.
I decided to start a project to keep track of all the coding for these interview questions, my solutions, and the solutions from others.
You will find in many of these files, more than one solution to the problem. In most of them, I tried to add a test method to test the solutions with data. Pytest will be required to run these.
Here are the sections:
CLassic stuff like fibonacci, factorial, max numbers, word frequency, etc.
These could also be considered "classic" interview coding questions, with solutions that I found on leetcode. I would try to solve these on my own, and then see how other amazing people could optimize things even more.
These were taken from some of the contests leetcode holds each week.
Occassionally I had interview coding set around the concept of parsing a text file. Three of these scenarios are here, along with text files for the tests to read.
Here are five advanced coding scenarios asked by specific companies. Some of these I found on Glassdoor; a couple of them I was asked to do in coderpad during a screen.
General code examples on how to do things in Python: classes, iterators, strings, etc.