Skip to content

098tarik/leetcode-portfolio

Repository files navigation

DSA Portfolio

A collection of Data Structures and Algorithms problems and solutions implemented in Python, organized by topic. Useful for interview preparation and practice.

Structure

The repository is organized by topic:

  • Backtracking

    • graph_color.py — Graph coloring
    • shakespeare.py — Text search with backtracking
    • subset_sum.py — Subset sum problem
    • subsets.py — Generating subsets
    • thes.py — Thesaurus search
  • Binary Search

    • simple_binary_search.py — Classic binary search
    • subarray_split.py — Splitting subarrays
    • target_k.py — Finding target k
    • two_array.py — Two-array binary search
    • valley.py — Valley finding
  • Dynamic Programming

    • minivan.py — Minivan problem
    • restuarants.py — Restaurant selection
  • Graphs

    • graph_path.py — Path finding
    • hill.py — Hill traversal
    • is_tree.py — Tree validation
    • reachability.py — Node reachability
    • shortest_path.py — Shortest path
    • spanning_tree.py — Spanning tree
    • strongly_connected.py — Strongly connected components
    • valid_undirected_graph.py — Undirected graph validation
  • Grids and Matrices

    • chess.py — Chess board problems
    • queen_reach.py — Queen reachability
    • snowprints.py — Snow prints traversal
    • spiral_order.py — Spiral order traversal
    • subgrid_max.py — Subgrid maximum
    • subgrid_sum.py — Subgrid sum
    • valid_sudoku.py — Sudoku validation
  • Heaps

    • first_k.py — First K elements
    • implement_heap.py — Heap implementation
    • k_most_played.py — K most played
    • top_songs.py — Top songs
  • Linked Lists

    • single_linked_list.py — Singly linked list
  • Sliding Windows

    • alternating.py — Alternating elements
    • best_sales.py — Best sales window
    • best_seller.py — Best seller window
    • enduring_seller.py — Enduring seller
    • max_sales.py — Maximum sales
    • max_subarray.py — Maximum subarray
    • sales.py — Sales analysis
  • Sorting

    • custom_comparator.py — Custom comparator sorting
    • sorting_by_frequency.py — Frequency-based sorting
  • String Manipulation

    • convert_case.py — Case conversion
    • is_alpha.py — Alphabetic check
    • string_join.py — String joining
    • string_match.py — String matching
    • string_split.py — String splitting
  • Trees

    • align.py — Tree alignment
    • hidden_message.py — Hidden message in tree
  • Two Pointers

    • prefix_suffix_swap.py — Prefix/suffix swap
    • sender.py — Sender problem
    • shift_word.py — Word shifting
  • Cheatsheets — Quick-reference guides

    • 01_Language_Core.md
    • 02_Data_Structures.md
    • 03_Sorting_and_Functional.md
    • 04_Math_and_Utils.md
    • 05_Trees_and_Graphs.md
    • 06_Key_Algorithms.md
    • 07_Dynamic_and_Greedy.md
    • 08_Misc_Algorithms.md

Usage

Each script is self-contained. Run any solution individually:

python path/to/script.py

About

This project is for LeetCode/interview questions to practice Data Structures and Algorithms. It contains a collection of problems and solutions implemented in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages