assignment2-majority-element/ ├── src/main/java/ │ ├── algorithms/MajorityElement.java # Main algorithm implementation │ ├── metrics/PerformanceTracker.java # Tracks performance metrics │ └── ...
First for loop will execute and then int count=0 will store a zero value then again for loop will execute and count++, After that I check a condition count > n/2.