Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
810 commits
Select commit Hold shift + click to select a range
09f9f80
Merge pull request #625 from Joseph-Acevedo/java_insertionsort
probot-auto-merge[bot] Oct 27, 2019
f6b5354
Balanced_Parenthesis_check
ankitha05 Oct 28, 2019
f613a20
Merge pull request #626 from ankitha05/master
probot-auto-merge[bot] Oct 28, 2019
08e44b1
README.me
vishnukumar650 Oct 28, 2019
bb181e7
Merge pull request #627 from vishnukumar650/patch-3
probot-auto-merge[bot] Oct 28, 2019
2a5cc2c
Quick sort using C
DhritiAM Oct 28, 2019
b14613e
Merge pull request #628 from DhritiAM/master
probot-auto-merge[bot] Oct 28, 2019
d4173fc
Created eggDrop.py
Samclouder Oct 28, 2019
e0fffd9
Update eggDrop.py
Samclouder Oct 28, 2019
5f83295
Update eggDrop.py
Samclouder Oct 28, 2019
63d31ed
Merge pull request #629 from Samclouder/master
probot-auto-merge[bot] Oct 28, 2019
30f1a6d
Added algorithm for finding next greater element in array using stack
sawlani1234 Oct 28, 2019
7ccfedf
Create Java
Ankit-555 Oct 28, 2019
312b278
Delete Java
Ankit-555 Oct 28, 2019
3ca19bd
Added LCS in Java
Ankit-555 Oct 28, 2019
7e2499e
Merge pull request #630 from Ankit-555/master
probot-auto-merge[bot] Oct 28, 2019
48bb0b9
Merge pull request #631 from sawlani1234/add-sawlani
probot-auto-merge[bot] Oct 28, 2019
f06cf91
README.me
k1sh0rek0ld Oct 28, 2019
6e5c778
Merge pull request #632 from k1sh0rek0ld/patch-1
probot-auto-merge[bot] Oct 28, 2019
49da5e1
README.md
k1sh0rek0ld Oct 28, 2019
e7e0d40
Merge pull request #633 from k1sh0rek0ld/patch-2
probot-auto-merge[bot] Oct 28, 2019
4ad886e
README.md
k1sh0rek0ld Oct 28, 2019
c244c96
Merge pull request #634 from k1sh0rek0ld/patch-3
probot-auto-merge[bot] Oct 28, 2019
d302eaa
Largest rectangle in histogram using stack
sawlani1234 Oct 28, 2019
9e289b9
Merge pull request #636 from sawlani1234/add-sawlani
probot-auto-merge[bot] Oct 28, 2019
f4e45c6
Regular Expression Match
sawlani1234 Oct 28, 2019
dee63bc
Regular expression match
sawlani1234 Oct 28, 2019
1419bb8
Merge pull request #638 from sawlani1234/add-sawlani
probot-auto-merge[bot] Oct 28, 2019
e46956f
Interleaved Strings
sawlani1234 Oct 28, 2019
8cce425
README.md
k1sh0rek0ld Oct 28, 2019
7c3e132
Merge pull request #640 from sawlani1234/add-sawlani
probot-auto-merge[bot] Oct 28, 2019
c6caf28
Merge pull request #641 from k1sh0rek0ld/patch-4
probot-auto-merge[bot] Oct 28, 2019
25e05eb
Create isPalindrome.js
risc12 Oct 28, 2019
ffe21c8
Merge pull request #642 from risc12/patch-2
probot-auto-merge[bot] Oct 28, 2019
6b59726
Create fibonacci.js
risc12 Oct 28, 2019
c88d9bc
Merge pull request #643 from risc12/patch-5
probot-auto-merge[bot] Oct 28, 2019
5cd0194
README.md
vishnukumar650 Oct 28, 2019
5613d10
Merge pull request #644 from vishnukumar650/patch-4
probot-auto-merge[bot] Oct 28, 2019
6f43ec9
added the euler totient function with a better complexity in c++
shubhgup11 Oct 28, 2019
19bdc63
Merge pull request #646 from shubhgup11/shubham
probot-auto-merge[bot] Oct 28, 2019
79ed5ee
Convex Algorithm
Oct 28, 2019
92a2901
Merge pull request #647 from agarwalsourabh55/hackover
probot-auto-merge[bot] Oct 28, 2019
d309e2f
added regex matching
migvanderlei Oct 28, 2019
0f37425
Merge pull request #648 from migvanderlei/master
probot-auto-merge[bot] Oct 28, 2019
952adc4
palindrome
Oct 29, 2019
91cbd11
Merge pull request #645 from neha07kumari/master
probot-auto-merge[bot] Oct 28, 2019
79c69c8
Gives Prime Numbers
harshita-jpg Oct 29, 2019
059e9ab
Merge pull request #649 from harshita-jpg/master
probot-auto-merge[bot] Oct 29, 2019
4d2eef2
Clock Sort
harshita-jpg Oct 29, 2019
633621d
Merge pull request #650 from harshita-jpg/master
probot-auto-merge[bot] Oct 29, 2019
18367c3
Create gcd and lcm
harshita-jpg Oct 29, 2019
4bb0b3a
Merge pull request #651 from harshita-jpg/master
probot-auto-merge[bot] Oct 29, 2019
8bc248d
Added Algorithm for Digit DP
vaibhavjain30699 Oct 29, 2019
416db49
Merge pull request #652 from vaibhavjain30699/master
probot-auto-merge[bot] Oct 29, 2019
c796a29
Create Selection_Sort_in_Kotlin.kt
sakshamsachdeva Oct 29, 2019
c0c145c
Merge pull request #654 from sakshamsachdeva/master
probot-auto-merge[bot] Oct 29, 2019
5e08680
Delete Selection_Sort_in_Kotlin.kt
sakshamsachdeva Oct 29, 2019
07abbb1
Create merge_sort_in_kotlin.kt
sakshamsachdeva Oct 29, 2019
6a45df8
Merge pull request #656 from sakshamsachdeva/master
probot-auto-merge[bot] Oct 29, 2019
a99d5d7
Create heap_sort_in_kotlin.kt
sakshamsachdeva Oct 29, 2019
daba549
Merge pull request #658 from sakshamsachdeva/master
probot-auto-merge[bot] Oct 29, 2019
78e093d
Create quick_sort_in_kotlin
sakshamsachdeva Oct 29, 2019
4a27a7b
Merge pull request #660 from sakshamsachdeva/master
probot-auto-merge[bot] Oct 29, 2019
3a05f63
Create count_sort_in_kotlin
sakshamsachdeva Oct 29, 2019
4d47692
Merge pull request #662 from sakshamsachdeva/master
probot-auto-merge[bot] Oct 29, 2019
cbfd8d0
Create binary_search_in_kotlin.kt
sakshamsachdeva Oct 29, 2019
72cb320
Merge pull request #664 from sakshamsachdeva/master
probot-auto-merge[bot] Oct 29, 2019
eef6ab8
sorting in c#
adityajain1677 Oct 29, 2019
76f188d
Merge pull request #665 from adityajain1677/master
probot-auto-merge[bot] Oct 29, 2019
b53a0f7
Create parallelbubblesort.cpp
bruce9steve Oct 29, 2019
a580c48
Merge pull request #666 from bruce9steve/master
probot-auto-merge[bot] Oct 29, 2019
f23c48d
add Python/cosine_similarity.py for example of cosine similarity in v…
Oct 29, 2019
eddae7d
Create ElulerianGraph.cpp
CO18326 Oct 29, 2019
34edf7c
Merge pull request #667 from CO18326/patch-4
probot-auto-merge[bot] Oct 29, 2019
f8f9aa3
Merge pull request #668 from nanto88/master
probot-auto-merge[bot] Oct 29, 2019
6e3e907
added allPossibleBST program
heman1 Oct 29, 2019
3330db9
Merge pull request #669 from heman1/NewAlgo
probot-auto-merge[bot] Oct 29, 2019
b244dca
Array Reversal.c
himanshusharma89 Oct 29, 2019
4344dad
Update Array Reversal.c
himanshusharma89 Oct 29, 2019
5c57e5d
Merge pull request #670 from rageremix/master
probot-auto-merge[bot] Oct 29, 2019
f6a80b9
added selection sort
gauravburjwal Oct 29, 2019
71c6931
refactored in folder
gauravburjwal Oct 29, 2019
1ccfd4c
Merge pull request #672 from gauravburjwal/selection_sort
probot-auto-merge[bot] Oct 29, 2019
cce0548
Job sequencing algorithm in C++
AMITAERO7 Oct 29, 2019
6abd6a4
Merge pull request #673 from AMITAERO7/master
probot-auto-merge[bot] Oct 29, 2019
bb7778b
Created Selectionsort.py
avi181197 Oct 29, 2019
d3288ba
Huffman coding in C++
AMITAERO7 Oct 29, 2019
c576b38
Merge pull request #674 from avi181197/master
probot-auto-merge[bot] Oct 29, 2019
66a11ca
Created tree traversal in c
avi181197 Oct 29, 2019
41ab20d
Merge pull request #675 from AMITAERO7/master
probot-auto-merge[bot] Oct 29, 2019
cae02bb
create heap sort in c++
avi181197 Oct 29, 2019
b344ff1
Create jobSequencing.cpp
avi181197 Oct 29, 2019
e9af63e
Elulerian graph algorithm in C++
AMITAERO7 Oct 29, 2019
e6d52b6
Egg Dropping algorithms in C++
AMITAERO7 Oct 29, 2019
4314dd9
Egg Dropping algorithm in C++
AMITAERO7 Oct 29, 2019
07d6071
Merge pull request #676 from avi181197/master
probot-auto-merge[bot] Oct 29, 2019
87ace8a
Euler Totient function algorithm in C++
AMITAERO7 Oct 29, 2019
896f0ee
quick sort in kotlin
avi181197 Oct 29, 2019
f968777
Create implementing stack using python
avi181197 Oct 29, 2019
7beb090
Nut and Bolt problem algorithm in C++
AMITAERO7 Oct 29, 2019
3af7dc5
Selection sort - fix #671
yurimalheiros Oct 29, 2019
7a641e0
Merge pull request #677 from avi181197/patch-1
probot-auto-merge[bot] Oct 29, 2019
acd0939
Merge pull request #678 from AMITAERO7/master
probot-auto-merge[bot] Oct 29, 2019
bfc6448
Create minimum_cut.cpp
CO18326 Oct 29, 2019
ecc4b1d
Merge pull request #679 from avi181197/master
probot-auto-merge[bot] Oct 29, 2019
50c425c
Merge pull request #680 from avi181197/patch-2
probot-auto-merge[bot] Oct 29, 2019
ed811e8
Create catalanNumbers.cpp
rudradesai200 Oct 29, 2019
1a3e73a
added BFS and DFS traversal in Java using both adjacency list and ma…
Oct 29, 2019
784ea68
updated README.md
Oct 29, 2019
16dc993
Merge pull request #681 from yurimalheiros/patch-1
probot-auto-merge[bot] Oct 29, 2019
d4a9ab6
Added bitap algorithm file in c++ folder
sourabhmandal Oct 29, 2019
8f74db1
Added "binary Search" algorithm in JAVA
sourabhmandal Oct 30, 2019
b0ca7ee
Added "Bubble Sort" Algorithm in Java in Java Directory
sourabhmandal Oct 30, 2019
2eb8adb
Added new directory named Go for algorithms in golang and added "Bina…
sourabhmandal Oct 30, 2019
5fe00c9
Added "Bubble Sort" Algorithm Golang in Go Directory
sourabhmandal Oct 30, 2019
7d635dc
Added "Counting inversion" Algorithm Golang in Go Directory
sourabhmandal Oct 30, 2019
d46c79b
Added "Djkistra" Algorithm Golang in Go Directory
sourabhmandal Oct 30, 2019
2e062a6
Added "FibonacciSeries" Algorithm Golang in Go Directory
sourabhmandal Oct 30, 2019
dda5ac7
Added "FloydsAlgorithm" Algorithm Golang in Go Directory
sourabhmandal Oct 30, 2019
9b7fe59
Added "Eucledian GCD" Algorithm in Golang in Go Directory
sourabhmandal Oct 30, 2019
b7c147c
Added "Hamming Distance" Algorithm in Golang in Go Directory
sourabhmandal Oct 30, 2019
38b181f
Added "Heap Sort" Algorithm in Golang in Go Directory
sourabhmandal Oct 30, 2019
020b136
Added "Insertion Sort" Algorithm in Golang in Go Directory
sourabhmandal Oct 30, 2019
dc6c5b7
Added "Kadanes Algorithm" in Golang in Go Directory
sourabhmandal Oct 30, 2019
acb9b11
Added "Linear Search Algorithm" in Golang in Go Directory
sourabhmandal Oct 30, 2019
d2e93fb
Added "Merge Sort Algorithm" in Golang in Go Directory
sourabhmandal Oct 30, 2019
76ed5c6
Merge pull request #685 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
915e0ee
Add QuickSort in Java Language
Oct 30, 2019
4afa700
Merge pull request #688 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
7fb95e8
Merge pull request #689 from abhaymaniyar/master
probot-auto-merge[bot] Oct 30, 2019
398c2bc
Merge pull request #691 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
7cd8e00
Merge pull request #693 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
4fd5432
Merge pull request #695 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
386da85
Merge pull request #697 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
779e32d
Merge pull request #699 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
d3eac2b
Merge pull request #701 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
353e100
Merge pull request #703 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
4279aea
Merge pull request #705 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
3a1df2b
Merge pull request #707 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
d681ccf
Merge pull request #709 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
47086a8
Merge pull request #711 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
6426750
Merge pull request #713 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
4612ae7
Merge pull request #715 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
1f1cfa8
Merge pull request #717 from bohemian997/master
probot-auto-merge[bot] Oct 30, 2019
c5c405e
binary-search-python
adarsh1mehra Oct 30, 2019
a1e64bc
Merge pull request #718 from adarsh1mehra/binary-search-python
probot-auto-merge[bot] Oct 30, 2019
4d9a7ca
add z_score_for_detect_outliers
Oct 30, 2019
f950d99
Merge pull request #719 from nanto88/master
probot-auto-merge[bot] Oct 30, 2019
0435702
add example of merge sort in python
Oct 30, 2019
ace7cf2
Merge pull request #720 from nanto88/master
probot-auto-merge[bot] Oct 30, 2019
024e520
added djaccard similiarity algorithm
swicaksono Oct 30, 2019
dac581c
union find
iAshishChauhan Oct 30, 2019
5dfcd75
Merge pull request #721 from iAshishChauhan/master
probot-auto-merge[bot] Oct 30, 2019
ad2a72c
Merge pull request #722 from swicaksono/master
probot-auto-merge[bot] Oct 30, 2019
d67d9c4
added recursive product of 2 number in cpp
bitroot9761 Oct 30, 2019
0f0437e
Merge pull request #723 from bitroot9761/master
probot-auto-merge[bot] Oct 30, 2019
d323404
example of multi layer neural network
swicaksono Oct 30, 2019
fa5dcb4
Merge pull request #724 from swicaksono/master
probot-auto-merge[bot] Oct 30, 2019
7c653a3
longest-common-subsequence-implementation
adarsh1mehra Oct 30, 2019
90d5afe
fibonacci.cpp using recursion
gaurangvyas98 Oct 30, 2019
5659111
Merge pull request #725 from gaurangvyas98/master
probot-auto-merge[bot] Oct 30, 2019
e70410d
Merge pull request #726 from adarsh1mehra/longest-common-subsequence
probot-auto-merge[bot] Oct 30, 2019
6b5f478
Added push down automata implementation
DeepankarAcharyya Oct 30, 2019
6a3365c
Merge pull request #727 from DeepankarAcharyya/master
probot-auto-merge[bot] Oct 30, 2019
d3116f8
add example of greater common divisor algorithm
swicaksono Oct 31, 2019
7e8753b
add example of N Choose K algorithm
swicaksono Oct 31, 2019
e7ce71e
Merge pull request #728 from swicaksono/master
probot-auto-merge[bot] Oct 31, 2019
5e05de5
Add files via upload
muthusk07 Oct 31, 2019
0004ca6
Merge pull request #729 from muthusk07/master
probot-auto-merge[bot] Oct 31, 2019
ea31cf0
add example of BubbleSort
Oct 31, 2019
6676d2b
Merge pull request #730 from nanto88/master
probot-auto-merge[bot] Oct 31, 2019
5ca22c1
Added Agent using DQN
swainsubrat Oct 31, 2019
6998b01
Merge pull request #731 from swainsubrat/master
probot-auto-merge[bot] Oct 31, 2019
6896698
add example of knapsack 0-1 algorithm
swicaksono Oct 31, 2019
977f974
Merge pull request #732 from swicaksono/master
probot-auto-merge[bot] Oct 31, 2019
d0edca5
added balanced parentheses in python
avi181197 Oct 31, 2019
52f3aea
Merge pull request #733 from avi181197/master
probot-auto-merge[bot] Oct 31, 2019
2c792f8
Create computeXOR1toN.py
goflora Nov 1, 2019
2d450a1
Merge pull request #734 from goflora/patch-4
probot-auto-merge[bot] Nov 1, 2019
cc03251
Adding Dijkstra's Algorithm
rudradesai200 Nov 1, 2019
c70ceb1
added recursion and backtracking
sgpritam Nov 2, 2019
389655c
Merge pull request #736 from sgpritam/test
probot-auto-merge[bot] Nov 2, 2019
ce6cb10
Add detectcycleingraph.py
souravmondaldev Nov 2, 2019
eeed69b
Merge pull request #737 from ask2sm/patch-4
probot-auto-merge[bot] Nov 2, 2019
065355a
add medianofmedian.cpp
souravmondaldev Nov 2, 2019
febf605
Merge pull request #738 from ask2sm/patch-5
probot-auto-merge[bot] Nov 2, 2019
47d936c
Add jhonsonshortestalgo.py
souravmondaldev Nov 2, 2019
15677cf
Merge pull request #739 from ask2sm/patch-6
probot-auto-merge[bot] Nov 2, 2019
2f1a4f0
closestpairofpoints.py
souravmondaldev Nov 3, 2019
840ca19
Merge pull request #740 from ask2sm/patch-7
probot-auto-merge[bot] Nov 3, 2019
64ebe35
Merge pull request #735 from rudradesai200/patch-1
iam-abbas Nov 3, 2019
046f52d
Merge pull request #684 from Shr03mink/master
iam-abbas Nov 3, 2019
b2c8b1a
Merge pull request #683 from rudradesai200/master
iam-abbas Nov 3, 2019
0fa18ad
Merge pull request #682 from CO18326/patch-5
iam-abbas Nov 3, 2019
142c0a9
Floodfillalgo.py
souravmondaldev Nov 3, 2019
ea3760b
Merge pull request #741 from ask2sm/patch-9
probot-auto-merge[bot] Nov 3, 2019
485823d
Machineselect.py
souravmondaldev Nov 3, 2019
7df63d9
Merge pull request #742 from ask2sm/patch-10
probot-auto-merge[bot] Nov 3, 2019
aa3f455
closestpairofpoints.py
souravmondaldev Nov 3, 2019
207a2d9
Merge pull request #743 from ask2sm/patch-11
probot-auto-merge[bot] Nov 3, 2019
6a9c447
robbinkarpstringmatching.py
souravmondaldev Nov 3, 2019
dc8aa5b
Merge pull request #744 from ask2sm/patch-14
probot-auto-merge[bot] Nov 3, 2019
7afdd19
naivestringmatching.py
souravmondaldev Nov 3, 2019
0e9e2d5
Merge pull request #745 from ask2sm/patch-15
probot-auto-merge[bot] Nov 3, 2019
703114d
kmpstringmatching.py
souravmondaldev Nov 3, 2019
8b49743
Merge pull request #746 from ask2sm/patch-17
probot-auto-merge[bot] Nov 3, 2019
e20d89d
Create avl.c
CO18326 Nov 3, 2019
443f06d
Merge pull request #747 from CO18326/patch-6
probot-auto-merge[bot] Nov 3, 2019
48d0c9f
studentstructure.cpp
souravmondaldev Nov 4, 2019
a3fb6c3
Merge pull request #748 from ask2sm/patch-18
probot-auto-merge[bot] Nov 4, 2019
9987538
queue.cpp
souravmondaldev Nov 4, 2019
cf4f18d
Merge pull request #749 from ask2sm/patch-19
probot-auto-merge[bot] Nov 4, 2019
474e841
queueusingclass.cpp
souravmondaldev Nov 4, 2019
d8ff197
Merge pull request #750 from ask2sm/patch-20
probot-auto-merge[bot] Nov 4, 2019
ec7bd53
bookclass.cpp
souravmondaldev Nov 4, 2019
e4df453
Merge pull request #751 from ask2sm/patch-21
probot-auto-merge[bot] Nov 4, 2019
d372763
matrixchainmultiplication.py
souravmondaldev Nov 4, 2019
730f81d
Merge pull request #752 from ask2sm/patch-22
probot-auto-merge[bot] Nov 4, 2019
b5c32b9
Creating dijkstra's algo implementation in cpp
rudradesai200 Nov 4, 2019
86e6a49
weightedjobscheduling.cpp
souravmondaldev Nov 4, 2019
b379f5b
Merge pull request #753 from rudradesai200/patch-2
probot-auto-merge[bot] Nov 4, 2019
72b88b4
Merge pull request #754 from ask2sm/patch-23
probot-auto-merge[bot] Nov 4, 2019
60c5193
Add exchangemoney.cpp
souravmondaldev Nov 4, 2019
3fbf7e9
Update exchangemoney.cpp
souravmondaldev Nov 4, 2019
2198b43
Merge pull request #755 from ask2sm/patch-24
probot-auto-merge[bot] Nov 4, 2019
a0e996c
naivestringmatching.py
souravmondaldev Nov 4, 2019
5792261
Merge pull request #756 from ask2sm/patch-25
probot-auto-merge[bot] Nov 4, 2019
7f6f39c
fcfsmultiprocessing.py
souravmondaldev Nov 4, 2019
f32894b
Merge pull request #757 from ask2sm/patch-26
probot-auto-merge[bot] Nov 4, 2019
726c3ae
isbipartite.py
souravmondaldev Nov 4, 2019
00f6744
maximumbipartitematching.py
souravmondaldev Nov 4, 2019
becce55
Merge pull request #758 from ask2sm/patch-28
probot-auto-merge[bot] Nov 4, 2019
a6bb6e8
Merge pull request #759 from ask2sm/patch-29
probot-auto-merge[bot] Nov 4, 2019
19f37a5
shotestcommonsupersequence.py
souravmondaldev Nov 5, 2019
6a9d0f3
Merge pull request #761 from ask2sm/patch-30
probot-auto-merge[bot] Nov 5, 2019
fa5ac5d
wordbreakingproblem.cpp
souravmondaldev Nov 6, 2019
e24c675
Merge pull request #762 from ask2sm/patch-31
probot-auto-merge[bot] Nov 6, 2019
b8cd15c
dicethrow.py
souravmondaldev Nov 6, 2019
37d095f
Update dicethrow.py
souravmondaldev Nov 6, 2019
eaa346f
Merge pull request #763 from ask2sm/patch-32
probot-auto-merge[bot] Nov 6, 2019
6099d17
searcharray.cpp
souravmondaldev Nov 9, 2019
b3fc62d
Merge pull request #764 from ask2sm/patch-33
probot-auto-merge[bot] Nov 9, 2019
c7f4f39
Add files via upload
Ashray-debug Mar 29, 2020
203036b
Merge pull request #765 from Ashray-debug/master
probot-auto-merge[bot] Mar 29, 2020
25dc2ce
Application of stack
JayanthApagundi Sep 3, 2020
a9a6891
Merge pull request #766 from JayanthApagundi/Child
probot-auto-merge[bot] Sep 3, 2020
33467cf
Create stable-marriage-pairing.py
souravmondaldev Oct 1, 2021
4b4b709
Merge pull request #768 from souravmondaldev/patch-1
probot-auto-merge[bot] Oct 1, 2021
e24763c
Create stable-matching-using-randomization.py
souravmondaldev Oct 1, 2021
d04aa8f
Merge pull request #769 from souravmondaldev/patch-2
probot-auto-merge[bot] Oct 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
69 changes: 69 additions & 0 deletions An Optimal Stopping Problem
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// C++ Program to test 1/e law for Secretary Problem :
#include <iostream>
#include <time.h>
#define e 2.71828
using namespace std;

// To find closest integer of num.
int roundNo(float num)
{
return num < 0 ? num - 0.5 : num + 0.5;
}

// Finds best candidate using n/e rule. candidate[]
// represents talents of n candidates.
void printBestCandidate(int candidate[], int n)
{
// Calculating sample size for benchmarking.
int sample_size = roundNo(n/e);
cout << "\n\nSample size is " << sample_size << endl;

// Finding best candidate in sample size
int best = 0;
for (int i = 1; i < sample_size; i++)
if (candidate[i] > candidate[best])
best = i;

// Finding the first best candidate that is
// better than benchmark set.
for (int i = sample_size; i < n; i++)
if (candidate[i] >= candidate[best]) {
best = i;
break;
}

if (best >= sample_size)
cout << endl << "Best candidate found is "
<< best + 1 << " with talent "
<< candidate[best] << endl;
else
cout << "Couldn't find a best candidate\n";
}

int main()
{
int n = 8;

// n = 8 candidates and candidate array contains
// talents of n candidate where the largest
// number means highest talented candidate.
int candidate[n];

// generating random numbers between 1 to 8
// for talent of candidate
srand(time(0));
for (int i = 0; i < n; i++)
candidate[i] = 1 + rand() % 8;

cout << "Candidate : ";
for (int i = 0; i < n; i++)
cout << i + 1 << " ";
cout << endl;
cout << " Talents : ";
for (int i = 0; i < n; i++)
cout << candidate[i] << " ";

printBestCandidate(candidate, n);

return 0;
}
33 changes: 33 additions & 0 deletions Array Reversal.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <stdio.h>
#include <stdlib.h>

int main()
{
int num, *arr, i;
scanf("%d", &num);
arr = (int*) malloc(num * sizeof(int));
for(i = 0; i < num; i++) {
scanf("%d", arr + i);
}
int* left_ptr = arr;
int* right_ptr;
int temp;
for(i = 0; i < num; i++) {
if(i == num - 1) {
right_ptr = (arr + i);
}
}
while(left_ptr < right_ptr) {
temp = *right_ptr;
*right_ptr = *left_ptr;
*left_ptr = temp;
right_ptr--;
left_ptr++;
}

for(i = 0; i < num; i++) {
printf("%d ", *(arr + i));
}
free(arr);
return 0;
}
94 changes: 94 additions & 0 deletions Array Stacking Algorithm/C++/stackusing2qs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#include<iostream>
using namespace std;

struct qu1// queue1 declaration {
qu1 *n1;
int d1;
}*f1 = NULL, *r1 = NULL, *q1 = NULL, *p1 = NULL, *np1 = NULL;

struct qu2// queue2 declaration {
qu2 *n2;
int d2;
}*f2 = NULL, *r2 = NULL, *q2 = NULL, *p2 = NULL, *np2 = NULL;

void enqueue1(int a) {
np1 = new qu1;
np1->d1 = a;
np1->n1 = NULL;
if (f1 == NULL) {
r1 = np1;
r1->n1 = NULL;
f1 = r1;
} else {
r1->n1 = np1;
r1 = np1;
r1->n1 = NULL;
}
}

int dequeue1() {
int a;
if (f1 == NULL) {
cout<<"no elements present in queue\n";
} else {
q1 = f1;
f1 = f1->n1;
a = q1->d1;
delete(q1);
return a;
}
}

void enqueue2(int a) {
np2 = new qu2;
np2->d2 = a;
np2->n2 = NULL;
if (f2 == NULL) {
r2 = np2;
r2->n2 = NULL;
f2 = r2;
} else {
r2->n2 = np2;
r2 = np2;
r2->n2 = NULL;
}
}

int dequeue2() {
int a;
if (f2 == NULL) {
cout<<"no elements present in queue\n";
} else {
q2 = f2;
f2 = f2->n2;
a = q2->d2;
delete(q2);
return a;
}
}

int main() {
int n, a, i = 0;
cout<<"Enter the number of elements to be entered into stack\n";
cin>>n;
while (i < n) {
cout<<"enter the element to be entered\n";
cin>>a;
enqueue1(a);
i++;
}
cout<<"\n\nElements popped\n\n";
while (f1 != NULL || f2 != NULL)// if both queues are not null {
if (f2 == NULL)// if queue 2 is null {
while (f1->n1 != NULL) {
enqueue2(dequeue1());
}
cout<<dequeue1()<<endl;
} else if (f1 == NULL)//if queue 1 is null {
while (f2->n2 != NULL) {
enqueue1(dequeue2());
}
cout<<dequeue2()<<endl;
}
}
}
90 changes: 90 additions & 0 deletions Automaton/PushDown-Automata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# A Simple Implementation of Push Down Automaton:
## Defining the 6 tuples:
#> * Q-->finite set of sets
#> * Sigma-->finite set of input alphabet
#> * Gamma-->finite set of stack alphabet
#> * Delta-->transition relation
#> * Q0-->start state
#> * Z-->initial stack symbol
#> * F-->set of accepting states

# Defining the states:

#* state 0: starting state

#* state 1:From state 0 whenever it sees a 1 or 2, it moves to state 1+pushes the element onto the stack
#* state 1:From state 1 whenever it sees a 1 or 2, it remains in state 1+pushes the element onto the stack

#* state 2:From state 1 whenever it sees a 0, it moves to state 2+pops from the stack
#* state 2:From state 1 whenever it sees a 0, it remains in state 2+pops from the stack

#* state 3:From state 0, if it sees a 0,it moves to state 3,the rejected state
#* state 3:From state 2, if it sees a 1 or 2 , it moves to state 3, the rejected state
#* state 3:If at the end, the stack is not empty, it moves to state 3,the rejected state

#stack functions
def push(a,list1):
#pushing to the stack/adding to the top of the stack
list1.append(a)
return 1

def pop(list1):
#for poping from the stack/removing the top element of the stack
index=len(list1)-1
if (index>0):
list1.pop(index)
return 1
else:
return 0

# Q={0,1,2,3}
# Sigma={0,1,2}
# Starting state={0}
# Z=#
# F={2}

#setting the initial stack symbol
stack=['#']
#setting the starting state
state=0

#taking the input
input_string=input('Enter the String:')

#performing the operations
l=len(input_string)
i=0
if l%2==0:
while i<l//2:
letter=int(input_string[i])
if letter in [1,2]:
push(letter,stack)
state=1
else :
state=3
break
i+=1

while i<l:
letter=int(input_string[i])
if state==3:
break
if letter==0:
state=2
pop(stack)
else:
state=3
break
i+=1
else:
state=3

if state==2 and len(stack)!=1:
state=3


#checking the final state and displaying the result
if(state==2):
print("The String is accepted")
else:
print("The String is rejected")
14 changes: 14 additions & 0 deletions BIT/ComputeXOR1toN/computeXOR1toN.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Direct XOR of all numbers from 1 to n
def computeXOR( n)

if (n % 4 == 0) :
return n
if (n % 4 == 1) :
return 1
if (n % 4 == 2) :
return n + 1
else :
return 0

n = input("enter N")
print(computeXOR(n))
27 changes: 27 additions & 0 deletions BIT/Maximum Subset XOR/flip.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <iostream>
using namespace std;

int countSetBit(int n)
{
int c = 0;
while (n)
{
c += n & 1;
n >>= 1;
}
return c;
}

int FlippedCount(int a, int b)
{
return countSetBit(a^b);
}


int main()
{
int n1 = 14;
int n2 = 50;
cout << FlippedCount(n1, n2)<<endl;
return 0;
}
57 changes: 57 additions & 0 deletions BIT/Maximum Subset XOR/maxXor.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#include<bits/stdc++.h>
using namespace std;

#define INT_BITS 32

int maxSubarrayXOR(int set[], int n)
{

int indx = 0;

for (int i = INT_BITS-1; i >= 0; i--)
{
int maxInd = indx;
int maxEle = INT_MIN;
for (int j = indx; j < n; j++)
{

if ( (set[j] & (1 << i)) != 0
&& set[j] > maxEle )
maxEle = set[j], maxInd = j;
}

if (maxEle == INT_MIN)
continue;

swap(set[indx], set[maxInd]);

maxInd = indx;

for (int j=0; j<n; j++)
{
if (j != maxInd &&
(set[j] & (1 << i)) != 0)
set[j] = set[j] ^ set[maxInd];
}

// Increment index of
// chosen elements
indx++;
}

int result = 0;
for (int i = 0; i < n; i++)
result ^= set[i];
return result;
}


int main()
{
int set[] = {10, 8, 5};
int n = sizeof(set) / sizeof(set[0]);

cout << "Maximum subset XOR is ";
cout << maxSubarrayXOR(set, n);
return 0;
}
Loading