Skip to content

muthu-kumar-u/go-search-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go - Search Algorithms

A collection of classic search algorithm implementations in Go (Golang). This repository is part of my journey to learn and practice algorithms daily, starting with fundamental search techniques.


Implemented Algorithms

  • Linear Search – Sequentially checks each element (O(n)).

  • Binary Search – Efficient divide & conquer on sorted arrays (O(log n)).

  • Jump Search – Jumps in √n steps, then scans linearly (O(√n)).

  • Exponential Search – Expands range exponentially, then binary search (O(log i)).

  • Ternary Search – Splits range into three sections instead of two (O(log₃ n)).


Purpose

  • Practice and compare different searching techniques.

  • Understand their time & space complexities.

  • Provide a clean and modular Go implementation for learners.

Time & Space Complexity

Algorithm Best Case Average Case Worst Case Space Complexity
Linear Search O(1) O(n) O(n) O(1)
Binary Search O(1) O(log n) O(log n) O(1)
Jump Search O(1) O(√n) O(√n) O(1)
Exponential Search O(1) O(log i) O(log i) O(1)
Ternary Search O(1) O(log₃ n) O(log₃ n) O(1)

About

A collection of classic search algorithm implementations in Go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages