Solving Missing Number
To see the question, click here.
Naive Approach
The idea is to sort the array and then compare the index with the number present at that index.
// TC: O(nlogn)
// SC: O(1)
import java.util.Arrays;
class MissingNumber {
public int missingNumber(...
vineethchivukula.hashnode.dev4 min read