Skip to content

Commit

Permalink
docs: Update README.md to cleanup after messy merge (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyen authored Jan 27, 2024
1 parent 6b2a814 commit 1b587b7
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ private static void merge(int[]arr,int low,int high,int mid){
### CycleSort

```java
<<<<<<< HEAD
public static int[]cycleSort(int[]arr){
int n=arr.length;
int i=0;
Expand All @@ -186,18 +185,6 @@ private static void merge(int[]arr,int low,int high,int mid){
arr[i]=arr[correctpos];
arr[correctpos]=temp;
}else{
=======
public static int[] cycleSort(int[] arr) {
int n = arr.length;
int i = 0;
while (i < n) {
int correctpos = arr[i] - 1;
if (arr[i] != arr[correctpos]) {
int temp = arr[i];
arr[i] = arr[correctpos];
arr[correctpos] = temp;
} else {
>>>>>>> 5123af2d27053cd36cfbf6a217e59f24c0d29703
i++;
}
}
Expand Down Expand Up @@ -821,19 +808,10 @@ final var checksumDigit=(10-(sum%10))%10;
### Prime

```java
<<<<<<< HEAD
public static boolean isPrime(int number){
if(number< 3){
return true;
}
=======
public static boolean isPrime(int number) {
//if number < 2 its not a prime number
if (number < 2) {
return false;
}
// 2 and 3 are prime numbers
>>>>>>> 5123af2d27053cd36cfbf6a217e59f24c0d29703

// check if n is a multiple of 2
if(number%2==0){
Expand Down Expand Up @@ -990,7 +968,6 @@ public static double calculateMatchRating(double firstPlayerRating,double second
### Anagram Check

```java
<<<<<<< HEAD
public boolean isAnagram(String s1,String s2){
var l1=s1.length();
var l2=s2.length();
Expand All @@ -999,23 +976,6 @@ public static double calculateMatchRating(double firstPlayerRating,double second
if(l1!=l2){
return false;
}
=======
public boolean isAnagram(String s1, String s2) {
var l1 = s1.length();
var l2 = s2.length();

if (l1 != l2) {
return false;
}

var arr1 = new int[256];
var arr2 = new int[256];

for (var i = 0; i < l1; i++) {
arr1[s1.charAt(i)]++;
arr2[s2.charAt(i)]++;
}
>>>>>>> 5123af2d27053cd36cfbf6a217e59f24c0d29703

for(var i=0;i<l1; i++){
arr1[s1.charAt(i)]++;
Expand Down

0 comments on commit 1b587b7

Please sign in to comment.