CompileMate CompileMate
Problems Contests
Battles Daily Challenge Achievements Teams
Learning Paths Certifications AI Tutor
Social Feed Code Reviews Snippets Leaderboard
Job Board Resume Scanner
Shop
Sign In Sign Up
Problems Contests Battles Daily Challenge Achievements Teams Learning Paths Certifications AI Tutor Social Feed Code Reviews Snippets Leaderboard Job Board Resume Scanner Shop
Sign In Sign Up
← Binary Search

Discussions

Sign in to join the discussion.
K kkumar OFFICIAL
4 weeks ago
Why does my solution TLE on the last test case? A single pass with a running value is enough here. Keep track of the best answer so far and update it as you scan, which gives O(n) time and O(1) extra space.
💬 2 replies
S sdeshpande
1 week, 6 days ago
Asked in my Oracle OA last week. A single pass with a running value is enough here. Keep track of the best answer so far and update it as you scan, which gives O(n) time and O(1) extra space.
💬 0 replies
D deepikakap7
1 month, 1 week ago
Simple approach explained for beginners. A single pass with a running value is enough here. Keep track of the best answer so far and update it as you scan, which gives O(n) time and O(1) extra space.
💬 0 replies
M manishver4
1 month, 2 weeks ago
Finally got AC after 3 WAs. Sharing what I missed. A single pass with a running value is enough here. Keep track of the best answer so far and update it as you scan, which gives O(n) time and O(1) extra space.
💬 1 reply
CompileMate
CompileMate
Code. Compete. Earn.

The competitive programming platform that rewards your skills with real-world value. Built for engineers who want more than just practice.

Get weekly coding tips

Platform

  • Problems
  • Contests
  • 1v1 Battles
  • Daily Challenge
  • Marketplace
  • Leaderboard
  • Achievements

Learn

  • Learning Paths
  • Certifications
  • AI Tutor
  • Social Feed
  • Teams
  • Collaboration

Company

  • About Us
  • Contact
  • FAQ
  • Job Board
  • Resume Scanner
  • Support
  • Privacy Policy
  • Terms
Platform Status: All Systems Operational
10K+
Developers
500+
Problems
125+
Contests
500+
Rewards Given

© 2026 CompileMate. All rights reserved.

Made with in India
Privacy Terms