t-regbs / algo-playground

DSA Playground

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Algo Playground

Tech Demo that has become a real thing :)

Repo for daily DSA practice in kotlin. Inspired by this katas

Supported Data Structures

  • Map
  • Trie
  • Stack
  • Queue
  • SinglyLinkedList
  • DoublyLinkedList
  • RingBuffer
  • MinHeap
  • LRU

Supported Algorithms

  • InsertionSort
  • MergeSort
  • QuickSort
  • BubbleSort
  • BinarySearch
  • LinearSearch
  • BTBFS (BFS on Binary Tree)
  • BTInOrder (In Order Traversal of Binary Tree)
  • BTPostOrder (Post Order Traversal of Binary Tree)
  • BTPreOrder (Pre Order Traversal of Binary Tree)
  • CompareBinaryTrees
  • DFSOnBST (DFS on Binary Tree)
  • CompareBinaryTrees
  • PrimsList (Prim's MST - Adjacency List)
  • DijkstraList (Dijkstra's Shortest Path -Adjacency List)

How to use it

  1. Set currentDay in your local gradle.properties file like so:

currentDay=1

  1. Add the short name for the algos you want to practice on that day to algoList in the build.gradle.kts file:
val algoList = listOf(
    "Map",
    "InsertionSort",
    "PrimsList",
    "BFSGraphList",
    "LinearSearch",
    "Trie",
    "Stack",
    "BTInOrder",
)
  1. Generate skeleton code for the algos in algoList by running:

gradlew runGenerator

  1. Write implementations for the algos

  2. Verify your implementations by running:

gradlew runTests

TODOS:

  • Add mechanism to autoincrement current day
  • Add gradle task to run single test
  • Add gradle task to clear day
  • Add gradle task to clear all days
  • Add progress tracking / reporting
  • Add more algos
  • Add more tests

About

DSA Playground


Languages

Language:Kotlin 100.0%