Approach Explanation (ノ◕ヮ◕)ノ*:・゚✧
- I wrote two helper functions, one to find the first_occurrence and one to find the last_occurrence using binary search.
- Each function returns an index (or -1 if not found).
- In the final return, I must call these functions with () so they execute and give results.
- Without (), Python just returns the function reference, not its output.
Method Used: (〜 ̄▽ ̄)〜
- Binary search twice
- Function calls
- Efficient runtime

Top comments (0)