Skip to content

Commit

Permalink
revamp
Browse files Browse the repository at this point in the history
  • Loading branch information
elarabyelaidy19 committed May 13, 2022
1 parent f9b4ec9 commit cae09a7
Show file tree
Hide file tree
Showing 67 changed files with 27 additions and 860 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions BinarySearch/BinarySearch.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package Gem.BinarySearch;

public class BinarySearch {
//
int peakIndexMountainArray(int[] arr) {
int l = 0;
int r = arr.length - 1;
int m = 0;
while (r > l) {
m = (l + r) / 2;
if (arr[m] < arr[m + 1])
l = m + 1;
else
r = m;
}
return l;
}
}
4 changes: 4 additions & 0 deletions BinarySearch/BinarySearch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# [PeakMountainIndexArray](https://leetcode.com/problems/peak-index-in-a-mountain-array/)
- search for the first number that is greater than its neighbors. arr[i] > arr[i+1]
- binary search array, return the index of the number at left if it is greater than its neighbors.
33 changes: 0 additions & 33 deletions Blind75/java/array/ConatinDuplicates.java

This file was deleted.

30 changes: 0 additions & 30 deletions Blind75/java/array/MaxSubarraySum.java

This file was deleted.

48 changes: 0 additions & 48 deletions Blind75/java/array/ProductOfArrayExceptItSelf.java

This file was deleted.

35 changes: 0 additions & 35 deletions Blind75/java/array/Stocks.java

This file was deleted.

17 changes: 0 additions & 17 deletions Blind75/java/array/TwoSum.java

This file was deleted.

29 changes: 0 additions & 29 deletions Blind75/ruby/array/122_stock.rb

This file was deleted.

41 changes: 0 additions & 41 deletions Blind75/ruby/array/contains_duplicates.rb

This file was deleted.

12 changes: 0 additions & 12 deletions Blind75/ruby/array/max_subarray_sum.rb

This file was deleted.

25 changes: 0 additions & 25 deletions Blind75/ruby/array/product_except_self.rb

This file was deleted.

15 changes: 0 additions & 15 deletions Blind75/ruby/array/two_sum.rb

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit cae09a7

Please sign in to comment.