Categorygithub.com/digitalcrab/leetcode-problems-go
repository
0.0.0-20241213163812-987bf04ffc21
Repository: https://github.com/digitalcrab/leetcode-problems-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

LeetCode solutions in Go

Data structures implemented in golang

  1. Linked Lists (insertion, deletion, search, reverse):
    • Singly linked list
    • Doubly linked list
  2. Stacks (push, pop, peek):
    • Using arrays/slices
    • Using linked lists
  3. Queues:
    • Using arrays/slices
    • Using linked lists
  4. Hash Tables (insert, delete, search)
    • Basic implementation
  5. Trees (insertion, deletion, traversal: inorder, preorder, postorder):
    • Binary tree
    • Binary Search Tree (BST)
    • AVL tree (self-balancing)
  6. Heaps (insert, delete, extract-min/max):
    • Min-Heap
    • Max-Heap
  7. Graphs (add edge, remove edge, search: DFS, BFS):
    • Adjacency matrix
    • Adjacency list

Algorithms implemented in golang

  1. Sorting Algorithms:
    • Bubble sort
    • Selection sort
    • Insertion sort
    • Merge sort
    • Quick sort
    • Heap sort
  2. Searching Algorithms:
    • Linear search
    • Binary search
  3. Graph Algorithms:
    • Depth-First Search (DFS)
    • Breadth-First Search (BFS)
    • Dijkstra’s algorithm (shortest path)
    • Floyd-Warshall algorithm (all pairs shortest path)
  4. Dynamic Programming:
    • Fibonacci sequence
    • Longest Common Subsequence (LCS)
    • Knapsack problem
    • Coin change problem
  5. Backtracking:
    • N-Queens problem
    • Sudoku solver
    • Subset sum problem

LeetCode Problems and solutions

NumberTitleDifficultyCheck
1Two SumEasy[x]
49Group AnagramsMedium[x]
217Contains DuplicateEasy[x]
242Valid AnagramEasy[x]