Skip to content

Latest commit

 

History

History

README.md

LeetCode Solutions - Shell Challenges

This section of the Algorithmic-Thinking repo contains my solutions to LeetCode challenges solved using shell/bash scripting.

Each solution is my final after multiple iterations to get a more streamlined and resource low code.

I will try to remember to edit each to explain the steps for later looking back.


What You'll Find Here

  • Shell script solutions to LeetCode problems.
    • One liners for each if possible.
  • Clean, commented code with problem context in each file header.
  • A focus on idiomatic Unix tooling/ doing the most with the least.

Structure

Each file follows a consistent header format:

# Source : <leetcode problem url>
# Author : Rose Martin
# Date   : YYYYMMDD
######################################
Decription right from Leetcode
######################################
Commented solution code

Philosophy

I believe in:

  • Writing scripts that are readable, not just functional
  • Reaching for the right tool — awk, sed, sort, uniq — not the convenient one (Also testing new tools to know what the right tools are)
  • Understanding why a one-liner works, not just that it works

Problems Solved

# Title Difficulty Final Solution One Liner
192 Word Frequency Medium WordFrequency.sh OLWordFrequency.sh
193 Valid Phone Number Easy ValidPhoneNumber.sh OLValidPhoneNumber.sh
194 TransposeFile Easy TransposeFile.sh -
195 TenthLine Easy TenthLine.sh Same

Built and maintained by Ebony Rose Martin https://thatone.dev