Skip to content

digitalcrab/leetcode-problems-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Number Title Difficulty Check
1 Two Sum Easy [x]
49 Group Anagrams Medium [x]
217 Contains Duplicate Easy [x]
242 Valid Anagram Easy [x]

About

Problems from leetcode with solutions in Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages