Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated insertion sort in c #116

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
33aa8e3
delete exe files
ekdnam Oct 3, 2020
801684e
delete test
ekdnam Oct 3, 2020
2b16609
delete redundant files
ekdnam Oct 3, 2020
5ac899a
remove cpp files from python
ekdnam Oct 3, 2020
6799b08
add readme.md for python
ekdnam Oct 3, 2020
15b80da
Create CONTRIBUTING.md
ekdnam Oct 3, 2020
e826e8b
add images
ekdnam Oct 3, 2020
429f4a5
create template for python branch
ekdnam Oct 3, 2020
70da6d1
Create README.md
ekdnam Oct 3, 2020
6997f5d
Create README.md
ekdnam Oct 3, 2020
b863e0a
added Quick sort in C
ACAA06 Oct 3, 2020
d503765
added Linear Search in C
ACAA06 Oct 3, 2020
717d306
Added linear search algo
zoraizasif Oct 3, 2020
a5d868b
Create fibonnaci search.c
avnishsingh516 Oct 3, 2020
700f91e
Create mergesort.c
avnishsingh516 Oct 3, 2020
f9f8023
Linear search added
ekdnam Oct 3, 2020
465ac1d
PritiShaw|selectionSort.c|Add Seclection Sort
PritiShaw Oct 3, 2020
e014e77
Merge branch 'c' into Add_Selection_Sort
PritiShaw Oct 3, 2020
88ea9b7
Update README.md
PritiShaw Oct 3, 2020
664ff77
Update and rename fibonnaci search.c to fibonacciSearch.c
avnishsingh516 Oct 3, 2020
c097d5d
Update mergesort.c
avnishsingh516 Oct 3, 2020
6896d6e
added newline and spaces
ACAA06 Oct 3, 2020
7da05a1
Merge branch 'c' into c
ACAA06 Oct 3, 2020
5fb5afb
Update fibonacciSearch.c
avnishsingh516 Oct 3, 2020
5cb6926
Merge pull request #56 from avnishsingh516/patch-2
ekdnam Oct 3, 2020
7fde210
match the upstream repo
ekdnam Oct 3, 2020
f5b5eba
Merge pull request #79 from PritiShaw/Add_Selection_Sort
ekdnam Oct 3, 2020
13206a3
Added file for binary search
ARKEOLOGIST Oct 3, 2020
6ea9e46
Merge pull request #103 from ARKEOLOGIST/arka
ekdnam Oct 3, 2020
0305eef
Delete linear_search_array_approach.cpp
ekdnam Oct 4, 2020
8b20973
Delete linear_search_vector_approach.cpp
ekdnam Oct 4, 2020
534e693
Delete fibonacciSearch.cpp
ekdnam Oct 4, 2020
474f607
Delete Bucket_Sort.cpp
ekdnam Oct 4, 2020
239fc68
Delete Permute_By_Cylic.cpp
ekdnam Oct 4, 2020
18be353
Delete Permute_In_Place.cpp
ekdnam Oct 4, 2020
806b9ce
Delete Permute_Without_Identity.cpp
ekdnam Oct 4, 2020
fd1c0e2
Merge pull request #51 from ACAA06/c
ekdnam Oct 4, 2020
9b21b84
rename file
ekdnam Oct 4, 2020
e5ca456
Merge pull request #58 from avnishsingh516/patch-3
ekdnam Oct 4, 2020
34fba97
updated insertion sort in c
JanitChawla Oct 4, 2020
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
Empty file added Graph Theory/README.md
Empty file.
1 change: 0 additions & 1 deletion Graph Theory/test

This file was deleted.

1 change: 0 additions & 1 deletion Miscellaneous/Largest Prime Factor/test

This file was deleted.

1 change: 0 additions & 1 deletion Miscellaneous/Largest Product of a series/test

This file was deleted.

1 change: 0 additions & 1 deletion Miscellaneous/Luhn's Algorithm/test

This file was deleted.

1 change: 0 additions & 1 deletion Miscellaneous/Palindrome Product/test

This file was deleted.

1 change: 0 additions & 1 deletion Miscellaneous/test

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Algorithms](./images/algorithms.jpg)

An attempt to aggregate all the various algorithms used in CS.
An attempt to aggregate all the various algorithms in CS.

## What you will gain by contributing here?

Expand Down
55 changes: 0 additions & 55 deletions Randomized Algorithms/Armstrong's Permutation/Permute_By_Cylic.cpp

This file was deleted.

1 change: 0 additions & 1 deletion Randomized Algorithms/Armstrong's Permutation/test

This file was deleted.

60 changes: 0 additions & 60 deletions Randomized Algorithms/Permute In Place/Permute_In_Place.cpp

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion Randomized Algorithms/Permute In Place/test

This file was deleted.

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion Randomized Algorithms/Permute Without Identity/test

This file was deleted.

1 change: 0 additions & 1 deletion Randomized Algorithms/test

This file was deleted.

97 changes: 0 additions & 97 deletions Searching/Binary Search/Binary_Search.cpp

This file was deleted.

Binary file removed Searching/Binary Search/Binary_Search.exe
Binary file not shown.
16 changes: 0 additions & 16 deletions Searching/Binary Search/arrayio.cpp

This file was deleted.

9 changes: 0 additions & 9 deletions Searching/Binary Search/arrayio.h

This file was deleted.

34 changes: 34 additions & 0 deletions Searching/Binary Search/binarySearch.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#include <stdio.h>

int binarySearch(int arr[], int left, int right, int x)
{
while (left <= right) {
int mid = left + (right - l) / 2;

if (arr[mid] > x)
right = mid - 1;

if (arr[mid] < x)
left = mid + 1;

else
return mid;

}

return -1;
}

int main(void)
{
int arr[] = { 2, 3, 4, 10, 40 };
int n = sizeof(arr) / sizeof(arr[0]);
int x = 10;
int result = binarySearch(arr, 0, n - 1, x);
(result == -1) ? printf("Element is not present"
" in array")
: printf("Element is present at "
"index %d",
result);
return 0;
}
1 change: 0 additions & 1 deletion Searching/Binary Search/test

This file was deleted.

1 change: 1 addition & 0 deletions Searching/Fibonacci Search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading