How do you sort an array of 0 and 1?
How do you sort an array of 0 and 1?
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: medium
标签: interviewbit, array, topic-specific, arrays, data-structures
参考答案摘要
You are given an array of 0s and 1s in random order and you have to sort this array i.e Segregate 0s on the left side and 1s on the right side of the array. Approach: Maintain two indexes and Initiali...
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。