← 返回 meta 的题目列表Optimize Suboptimal Solution for Edge Cases
类型:online_judge
Given an algorithm problem, you have proposed a suboptimal solution. The interviewer wants you to optimize this solution and address all edge cases. Due to time constraints, you need to quickly explain how to alter the algorithm to solve these edge cases and improve the code implementation as much as possible in the remaining time. Clearly identify what edge cases are and how to handle them. Assume the input data size is 10000.
Example
Input
1 2 3 4 5