Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions MissingNumberInSortedArray.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

class MissingNumberInSortedArray {
int missingNumber(int arr[]) {
// code here
int low = 0;
int high = arr.length-1;
while(low<=high){
int mid = (low+high)/2;
if(arr[mid]==mid+1){
low = mid+1;
}else{
high = mid-1;
}
}
return low+1;
}
}
1 change: 0 additions & 1 deletion Problem1.java

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Competitive-Coding-1

Please submit the interview problems posted in slack channel here. The problems and statements are intentionally not shown here so that students are not able to see them in advance

## Interview 1 problem
https://www.geeksforgeeks.org/problems/missing-number-in-sorted-array-of-natural-numbers/1