A new collection of my personal solutions to various code challenges.
This repo implements solutions in Python 3.10+. It's recommended to run and install dependencies from a virtual environment.
After cloning this repo, to install dev dependencies:
make devTests are setup to run with Pythons builtin unittest library.
make testIf all is configured correctly linting should happen automatically in the dev container. Future work will include a make recipe.
-
- Challenge: Stargate SG-1: Cute and Fuzzy
- Location: ./src/code_wars/sg1.py
- Strategy: Create a graph and use a breadth first search to find a possible route.
- Resources:
-
- Challenge: Next bigger number with the same digits
- Location: ./src/code_wars/next_bigger_number.py
- Strategy:
- Moving from right to left find first number with a larger number to the right.
- Next find the smallest number to the right of this number that is also large than this number.
- Then switch these two numbers.
- Sort all the numbers to the right of the left number.
-
- Challenge: Switch the Bulb--Play game Series #10
- Location: ./src/code_wars/switch_the_bulbs.py
- Strategy: Create a graph and use a depth first search to find a possible route.
- Resources:
-
- Challenge: Range Extraction
- Location: ./src/code_wars/range_extraction.py
-
- Challenge: zigzag-conversion
- Location: [./src/code_wars/zigzag_conversion.py](./src/leet code/zigzag_conversion.py)
-
- Challenge: Min Window Substring
- Location: ./src/leet_code/min_window_substring.py
-
- Challenge: Minesweeper I — Grid
- Location: ./src/edabit/minesweeper_i_grid.py
-
- Challenge: Longest Alternating Substring
- Location: ./src/edabit/longest_alternating_substring.py