Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Algorithm Design & Analysis β€” Java

This project demonstrates algorithm design principles using search algorithms:

  • Linear Search
  • Binary Search

It includes documentation of Big-O time complexity and code comments.


πŸš€ Features

βœ”οΈ Clean Java OOP structure
βœ”οΈ Algorithms separated into utility class
βœ”οΈ Complexity analysis in comments
βœ”οΈ Simple demonstration in main program


🧠 Algorithms

πŸ”Ή Linear Search

  • Scans each element from left to right
  • Works on unsorted data
  • Time Complexity:
    • Best: O(1)
    • Worst: O(n)
  • Space: O(1)

πŸ”Ή Binary Search

  • Requires sorted input
  • Repeatedly divides the search range
  • Time Complexity:
    • Best: O(1)
    • Worst: O(log n)
  • Space: O(1) iterative

🏁 How to Run

javac SearchAlgorithms.java AlgorithmAnalysis.java
java AlgorithmAnalysis

About

optional

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages