Skip to content

Latest commit

 

History

History
89 lines (65 loc) · 1.24 KB

File metadata and controls

89 lines (65 loc) · 1.24 KB

Algorithm Name

Problem Statement

Clearly describe the problem the algorithm solves. Mention constraints if applicable.


Approach / Intuition

Explain the core idea behind the algorithm. Why does this approach work?


Step-by-Step Explanation

  1. Describe the initial setup
  2. Explain the main logic
  3. Explain how the algorithm progresses
  4. Mention termination condition and edge cases

Code Implementation

C++

// Write your C++ implementation here
#include <bits/stdc++.h>
using namespace std;

void algorithmName() {
    // implementation
}

int main() {
    algorithmName();
    return 0;
}

Java

// Write your Java implementation here
class Main {
    static void algorithmName() {
        // implementation
    }

    public static void main(String[] args) {
        algorithmName();
    }
}

Python

# Write your Python implementation here
def algorithm_name():
    pass

if __name__ == "__main__":
    algorithm_name()

Time Complexity

  • Best Case:
  • Average Case:
  • Worst Case:

Space Complexity

  • Auxiliary Space:

Edge Cases

  • Mention important edge cases handled by the algorithm

References (Optional)

  • Articles, books, or links used