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

BHASKAR'S HACKTOBER.CPP #4

Open
wants to merge 282 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
282 commits
Select commit Hold shift + click to select a range
d551410
Merge pull request #14 from himanshu9199/patch-1
sunnyshahabuddin Oct 25, 2020
1959a84
Create OptimalEdgeWeights.cpp
rajhimanshumax Oct 25, 2020
7d0a5d6
Create Largest Windmill.cpp
rajhimanshumax Oct 25, 2020
4719fb0
Create Little Shino and K Ancestor.cpp
rajhimanshumax Oct 25, 2020
f5e3cb3
Create MaximumSpanningTree.cpp
rajhimanshumax Oct 25, 2020
7ed4bee
Create TheFamilyTreeOfBob.cpp
rajhimanshumax Oct 25, 2020
16ff2ff
Create TreeXor.cpp
rajhimanshumax Oct 25, 2020
dfdc7b6
Merge pull request #21 from rajhimanshumax/patch-8
sunnyshahabuddin Oct 25, 2020
31011c9
Merge pull request #19 from rajhimanshumax/patch-6
sunnyshahabuddin Oct 25, 2020
4d351fb
Merge pull request #18 from rajhimanshumax/patch-4
sunnyshahabuddin Oct 25, 2020
7f16d43
Merge pull request #15 from rajhimanshumax/patch-1
sunnyshahabuddin Oct 25, 2020
b66e657
Merge pull request #17 from rajhimanshumax/patch-3
sunnyshahabuddin Oct 25, 2020
2310422
dfs.cpp
sks-21 Oct 27, 2020
84480ee
Merge pull request #22 from coolsks/master
sunnyshahabuddin Oct 27, 2020
77c09c6
Bipartite.cpp
sks-21 Oct 28, 2020
64c3740
Sssp.cpp
sks-21 Oct 28, 2020
4d53987
ConecComp.cpp
sks-21 Oct 28, 2020
c0f6b63
IsGraphATree.cpp
sks-21 Oct 28, 2020
6508cbc
Merge pull request #26 from coolsks/patch-4
sunnyshahabuddin Oct 28, 2020
50e22f5
Merge pull request #25 from coolsks/patch-3
sunnyshahabuddin Oct 28, 2020
ffaa5cd
Merge pull request #24 from coolsks/patch-2
sunnyshahabuddin Oct 28, 2020
04f777a
Merge pull request #23 from coolsks/patch-1
sunnyshahabuddin Oct 28, 2020
88b4b00
Create knapsack_pranshu.cpp
PranshuKumarSingh Oct 30, 2020
93d5722
Create Coinchange_pranshu.cpp
PranshuKumarSingh Oct 30, 2020
fb5e98c
Create Fib_pranshu.cpp
PranshuKumarSingh Oct 30, 2020
7db8b1e
Create Euler_pranshu.cpp
PranshuKumarSingh Oct 30, 2020
d257bbf
Create Array_gcd_pranshu.cpp
PranshuKumarSingh Oct 30, 2020
ed0fe12
Create coin_change_manikant.cpp
manikantsangam7 Oct 30, 2020
440e2ee
Create euler_totient_manikant.cpp
manikantsangam7 Oct 30, 2020
6a8fdc3
Create gcd_manikant.cpp
manikantsangam7 Oct 30, 2020
4cae0c1
Create fibonacci_manikant.cpp
manikantsangam7 Oct 30, 2020
ea519b1
Create Maximum coins.java
YashdeepShakti Oct 30, 2020
152c1bb
Create Sub string occurance using SLL.java
YashdeepShakti Oct 30, 2020
3fc7777
Create New Hour Prime Diff.cpp
YashdeepShakti Oct 30, 2020
fb88d04
Create Shortest path(given graph with unknown weights).java
YashdeepShakti Oct 30, 2020
99aaae9
Merge pull request #27 from pranshukumarsingh/patch-1
sunnyshahabuddin Oct 31, 2020
6401e95
Merge pull request #29 from pranshukumarsingh/patch-3
sunnyshahabuddin Oct 31, 2020
62a0471
Merge pull request #30 from pranshukumarsingh/patch-5
sunnyshahabuddin Oct 31, 2020
e0247e8
Merge pull request #31 from pranshukumarsingh/patch-6
sunnyshahabuddin Oct 31, 2020
4377844
Merge pull request #32 from manikantsangam7/patch-1
sunnyshahabuddin Oct 31, 2020
8bb9799
Merge pull request #28 from pranshukumarsingh/patch-2
sunnyshahabuddin Oct 31, 2020
dc0833c
Merge pull request #39 from YashdeepShakti/patch-4
sunnyshahabuddin Oct 31, 2020
ef8e947
Merge pull request #38 from YashdeepShakti/patch-3
sunnyshahabuddin Oct 31, 2020
c26cbec
Merge pull request #37 from YashdeepShakti/patch-2
sunnyshahabuddin Oct 31, 2020
2a87d5f
Merge pull request #36 from YashdeepShakti/patch-1
sunnyshahabuddin Oct 31, 2020
2e5238a
Merge pull request #35 from manikantsangam7/patch-4
sunnyshahabuddin Oct 31, 2020
83466d4
Merge pull request #34 from manikantsangam7/patch-3
sunnyshahabuddin Oct 31, 2020
4b10439
Merge pull request #33 from manikantsangam7/patch-2
sunnyshahabuddin Oct 31, 2020
b1e4c81
Count Inversions
Ayushsinhahaha Oct 2, 2021
6a2a404
Merge pull request #40 from Ayushsinhahaha/master
sunnyshahabuddin Oct 2, 2021
a7b467b
Linked List Basic Inserting New Node
imanshu11 Oct 2, 2021
8df6efe
Dadjokes
Ayushsinhahaha Oct 2, 2021
836a0dd
Merge pull request #41 from imanshu11/patch-1
sunnyshahabuddin Oct 2, 2021
48afbbf
Merge pull request #42 from Ayushsinhahaha/patch-1
sunnyshahabuddin Oct 2, 2021
0da7f4a
Create Bidirectionalsearch.cpp
Ayushsinhahaha Oct 2, 2021
bb856ba
Create wikiapi.js
Ayushsinhahaha Oct 2, 2021
cd06a62
Merge pull request #44 from Ayushsinhahaha/patch-3
sunnyshahabuddin Oct 2, 2021
b1999f2
Magics Squares
imanshu11 Oct 2, 2021
99d2618
Merge pull request #43 from Ayushsinhahaha/patch-2
sunnyshahabuddin Oct 2, 2021
fdbae24
Merge pull request #45 from imanshu11/patch-2
sunnyshahabuddin Oct 2, 2021
c06da03
Sprintf in C
imanshu11 Oct 2, 2021
37fa230
Create longestcommonsubsequnce.cpp
its-shahabuddin Oct 2, 2021
3871f4d
Merge pull request #46 from its-shahabuddin/patch-1
sunnyshahabuddin Oct 2, 2021
0cfa21c
Merge pull request #47 from imanshu11/patch-3
sunnyshahabuddin Oct 2, 2021
1e0daef
Print BST key
imanshu11 Oct 2, 2021
be49088
Create knapsack.cpp
its-shahabuddin Oct 2, 2021
77f6a20
Create coinchange.cpp
its-shahabuddin Oct 2, 2021
6068069
Create bitmasking.cpp
its-shahabuddin Oct 2, 2021
26a8e83
Count ways to assign unique cap to every person
imanshu11 Oct 2, 2021
987f561
Merge pull request #49 from its-shahabuddin/patch-2
sunnyshahabuddin Oct 2, 2021
440363e
Merge pull request #48 from imanshu11/patch-4
sunnyshahabuddin Oct 2, 2021
d9a121e
Merge pull request #50 from its-shahabuddin/patch-3
sunnyshahabuddin Oct 2, 2021
43ba170
Merge pull request #52 from imanshu11/patch-5
sunnyshahabuddin Oct 2, 2021
9286e8c
Merge pull request #51 from its-shahabuddin/patch-4
sunnyshahabuddin Oct 2, 2021
2717086
Create maxlengthchain.cpp
its-shahabuddin Oct 2, 2021
b90b22b
Merge pull request #53 from its-shahabuddin/patch-5
sunnyshahabuddin Oct 2, 2021
7612c8e
Create lobtt.cpp
sunnyshahabuddin Oct 3, 2021
988e27a
Merge pull request #1 from its-sunny/patch-1
Ayushsinhahaha Oct 3, 2021
23076a5
Merge pull request #54 from Ayushsinhahaha/master
sunnyshahabuddin Oct 4, 2021
83789c6
Create targetsumtriplet.cpp
vivekthakur8102000 Oct 5, 2021
57ba6ea
Merge pull request #55 from vivekthakur8102000/patch-2
sunnyshahabuddin Oct 5, 2021
9afc9e6
Create power.cpp
vivekthakur8102000 Oct 5, 2021
819015f
Create quicksort.cpp
vivekthakur8102000 Oct 5, 2021
667ca53
Create mergesort.cpp
vivekthakur8102000 Oct 5, 2021
07f677b
Merge pull request #58 from vivekthakur8102000/patch-5
sunnyshahabuddin Oct 5, 2021
627c9ce
Merge pull request #57 from vivekthakur8102000/patch-4
sunnyshahabuddin Oct 5, 2021
3919a58
Merge pull request #56 from vivekthakur8102000/patch-3
sunnyshahabuddin Oct 5, 2021
63ebb76
Create linearsearch.cpp
kumarvivek8 Oct 6, 2021
a31196e
Create binarysearch.cpp
kumarvivek8 Oct 6, 2021
0522cb6
Create selectionsort.cpp
kumarvivek8 Oct 6, 2021
a9e6279
Create insertionsort.cpp
kumarvivek8 Oct 6, 2021
f1194cf
Merge pull request #62 from kumarvivek8/patch-5
sunnyshahabuddin Oct 6, 2021
ed88b7e
Merge pull request #61 from kumarvivek8/patch-4
sunnyshahabuddin Oct 6, 2021
d9c7e88
Merge pull request #60 from kumarvivek8/patch-3
sunnyshahabuddin Oct 6, 2021
40c0c36
Merge pull request #59 from kumarvivek8/patch-2
sunnyshahabuddin Oct 6, 2021
b0e1f39
Create queueusingarray.cpp
kumarvivek943143 Oct 18, 2021
02a34f9
Create queueusingstl.cpp
kumarvivek943143 Oct 18, 2021
08eab09
Create queueusingstack.cpp
kumarvivek943143 Oct 18, 2021
32ef508
Create implementingstackusingqueue.cpp
kumarvivek943143 Oct 18, 2021
7766ae3
Merge pull request #66 from kumarvivek943143/patch-5
sunnyshahabuddin Oct 20, 2021
18c2bba
Merge pull request #65 from kumarvivek943143/patch-4
sunnyshahabuddin Oct 20, 2021
d36c9be
Merge pull request #64 from kumarvivek943143/patch-3
sunnyshahabuddin Oct 20, 2021
033b68f
Merge pull request #63 from kumarvivek943143/patch-2
sunnyshahabuddin Oct 20, 2021
507abeb
Create fact.cpp
sks-21 Oct 29, 2021
bb71b52
Create RabinKarp Algorithm
sks-21 Oct 29, 2021
843197f
Create Z-function.cpp
sks-21 Oct 29, 2021
affb436
Create Aho-corasick.cpp
sks-21 Oct 29, 2021
a00f652
Create TernarySearch.cpp
sks-21 Oct 29, 2021
9dd73c6
Create osprime.py
YashdeepShakti Oct 30, 2021
95f8986
Create multichat_client.py
YashdeepShakti Oct 30, 2021
581f5ee
Create multichat_server.py
YashdeepShakti Oct 30, 2021
f79e893
Create ceaser_reviver.py
YashdeepShakti Oct 30, 2021
f135905
Create caesar_sender.py
YashdeepShakti Oct 30, 2021
93da4a6
Merge pull request #76 from YashdeepShakti/patch-9
sunnyshahabuddin Oct 31, 2021
d0f2535
Merge pull request #75 from YashdeepShakti/patch-8
sunnyshahabuddin Oct 31, 2021
7098ac4
Merge pull request #74 from YashdeepShakti/patch-7
sunnyshahabuddin Oct 31, 2021
84b211a
Merge pull request #73 from YashdeepShakti/patch-6
sunnyshahabuddin Oct 31, 2021
7a27981
Merge pull request #72 from YashdeepShakti/patch-5
sunnyshahabuddin Oct 31, 2021
31fe3aa
Merge pull request #16 from rajhimanshumax/patch-2
sunnyshahabuddin Oct 31, 2021
5d017ee
Merge pull request #71 from sks-21/patch-11
sunnyshahabuddin Oct 31, 2021
2db0269
Merge pull request #70 from sks-21/patch-9
sunnyshahabuddin Oct 31, 2021
cd13d76
Merge pull request #69 from sks-21/patch-7
sunnyshahabuddin Oct 31, 2021
fa280e3
Merge pull request #68 from sks-21/patch-6
sunnyshahabuddin Oct 31, 2021
db5e170
Merge pull request #67 from sks-21/patch-5
sunnyshahabuddin Oct 31, 2021
f23f414
Create keshavvats1.cpp
keshavvats389 Oct 31, 2021
54e7419
Create k100_2.cpp
keshavvats389 Oct 31, 2021
58ff393
Create k100_3.cpp
keshavvats389 Oct 31, 2021
22ec711
Create k100_4.cpp
keshavvats389 Oct 31, 2021
bcfc54b
Create anish_1.cpp
anishanand1298 Oct 31, 2021
8bb7ec5
Create maxsum.cpp
anishanand1298 Oct 31, 2021
b425928
Create bitonic.cpp
anishanand1298 Oct 31, 2021
e0dcc15
Create rainwater.cpp
anishanand1298 Oct 31, 2021
a7667a8
Create activity.cpp
rcpkraj1386 Oct 31, 2021
5dd2fc0
Create nextpermutation.cpp
rcpkraj1386 Oct 31, 2021
e10e2a5
Create unique.cpp
rcpkraj1386 Oct 31, 2021
b9cf3ea
Create hulk.cpp
rcpkraj1386 Oct 31, 2021
9fdb2e0
Create count_setbits.cpp
viveksingh8102000 Oct 31, 2021
1c79387
Create matrixsearch.cpp
viveksingh8102000 Oct 31, 2021
ef48fde
Create stringsort.cpp
viveksingh8102000 Oct 31, 2021
7d99ed2
Create kthroot.cpp
viveksingh8102000 Oct 31, 2021
1f56ac8
Merge pull request #92 from viveksingh8102000/patch-5
sunnyshahabuddin Oct 31, 2021
0fa1c9e
Merge pull request #91 from viveksingh8102000/patch-4
sunnyshahabuddin Oct 31, 2021
f53288f
Merge pull request #90 from viveksingh8102000/patch-3
sunnyshahabuddin Oct 31, 2021
c61701e
Merge pull request #89 from viveksingh8102000/patch-2
sunnyshahabuddin Oct 31, 2021
ac50eb4
Merge pull request #88 from rcpkraj1386/patch-5
sunnyshahabuddin Oct 31, 2021
a1a2817
Merge pull request #87 from rcpkraj1386/patch-4
sunnyshahabuddin Oct 31, 2021
7bf567c
Merge pull request #86 from rcpkraj1386/patch-3
sunnyshahabuddin Oct 31, 2021
4c25f94
Merge pull request #85 from rcpkraj1386/patch-2
sunnyshahabuddin Oct 31, 2021
084572d
Merge pull request #84 from anishanand1298/patch-5
sunnyshahabuddin Oct 31, 2021
b70d089
Merge pull request #83 from anishanand1298/patch-4
sunnyshahabuddin Oct 31, 2021
8b86fb1
Merge pull request #82 from anishanand1298/patch-3
sunnyshahabuddin Oct 31, 2021
7b31140
Merge pull request #81 from anishanand1298/patch-2
sunnyshahabuddin Oct 31, 2021
23b836f
Merge pull request #80 from keshavvats389/patch-5
sunnyshahabuddin Oct 31, 2021
491be88
Merge pull request #79 from keshavvats389/patch-4
sunnyshahabuddin Oct 31, 2021
1d734d1
Merge pull request #78 from keshavvats389/patch-3
sunnyshahabuddin Oct 31, 2021
95c3f8e
Merge pull request #77 from keshavvats389/patch-2
sunnyshahabuddin Oct 31, 2021
7cc511f
Create upperbound.cpp
ranjanashish6046 Oct 31, 2021
f7d9353
Create bookaloocation.cpp
ranjanashish6046 Oct 31, 2021
6dca477
Create aggresivecow.cpp
ranjanashish6046 Oct 31, 2021
7e04513
Create painterpartition.cpp
ranjanashish6046 Oct 31, 2021
81365c1
Merge pull request #93 from ranjanashish6046/patch-2
sunnyshahabuddin Oct 31, 2021
08a3d76
Merge pull request #95 from ranjanashish6046/patch-4
sunnyshahabuddin Oct 31, 2021
6cba99e
Merge pull request #96 from ranjanashish6046/patch-5
sunnyshahabuddin Oct 31, 2021
07877f0
Merge pull request #94 from ranjanashish6046/patch-3
sunnyshahabuddin Oct 31, 2021
c6b654c
Create index.html
mstecrd Sep 17, 2022
baa6eec
Merge pull request #97 from mstecrd/master
sunnyshahabuddin Sep 17, 2022
a54e481
Cleaned up the base
sunnyshahabuddin Sep 18, 2022
57eac36
Merge pull request #101 from sunnyshahabuddin/1-cleaning-up-the-base
sunnyshahabuddin Sep 18, 2022
63d04c6
Create helloWorld.cpp
mstecrd Oct 18, 2022
3f71846
Create addTwoNumber.cpp
mstecrd Oct 18, 2022
290b1f0
Create fibonacci.cpp
mstecrd Oct 18, 2022
2dac914
Create primeNumber.cpp
mstecrd Oct 18, 2022
a7d3413
Merge pull request #105 from mstecrd/patch-4
sunnyshahabuddin Oct 18, 2022
3d66df2
Merge pull request #104 from mstecrd/patch-3
sunnyshahabuddin Oct 18, 2022
ee6b85f
Merge pull request #103 from mstecrd/patch-2
sunnyshahabuddin Oct 18, 2022
a673736
Merge pull request #102 from mstecrd/patch-1
sunnyshahabuddin Oct 18, 2022
b4933cb
Create insertion.cpp
vivekthakur8102000 Oct 31, 2022
9224f99
Create aggresivecows.cpp
vivekthakur8102000 Oct 31, 2022
d0e9718
Create midpointeclipse.cpp
vivekthakur8102000 Oct 31, 2022
4697bbc
Create circle.cpp
vivekthakur8102000 Oct 31, 2022
7792b0b
Create sumoftwoarray.cpp
vivekthakur8102000 Oct 31, 2022
7c83dd2
Create extralongfactorial.cpp
vivekthakur8102000 Oct 31, 2022
3fb5696
Create sortinginlineartime.cpp
vivekthakur8102000 Oct 31, 2022
59b89e2
Create sortgame.cpp
vivekthakur8102000 Oct 31, 2022
412a370
Merge pull request #113 from vivekthakur8102000/patch-13
sunnyshahabuddin Oct 31, 2022
1c27e34
Merge pull request #112 from vivekthakur8102000/patch-12
sunnyshahabuddin Oct 31, 2022
e4b4db8
Merge pull request #111 from vivekthakur8102000/patch-11
sunnyshahabuddin Oct 31, 2022
079caa0
Merge pull request #110 from vivekthakur8102000/patch-10
sunnyshahabuddin Oct 31, 2022
b7c6048
Merge pull request #109 from vivekthakur8102000/patch-9
sunnyshahabuddin Oct 31, 2022
b676b56
Merge pull request #108 from vivekthakur8102000/patch-8
sunnyshahabuddin Oct 31, 2022
129e410
Merge pull request #107 from vivekthakur8102000/patch-7
sunnyshahabuddin Oct 31, 2022
8ddeec1
Merge pull request #106 from vivekthakur8102000/patch-6
sunnyshahabuddin Oct 31, 2022
39c0b04
Create uniqueno3.cpp
viveksingh8102000 Oct 31, 2022
f56101f
Create gcd.cpp
viveksingh8102000 Oct 31, 2022
ea8e13d
Create divisiblesubarrays.cpp
viveksingh8102000 Oct 31, 2022
6b608e0
Create modularexponentiation.cpp
viveksingh8102000 Oct 31, 2022
1fcfac2
Create primevisit.cpp
kumarvivek943143 Oct 31, 2022
45dd75c
Create replaceallocuurenceofpi.cpp
kumarvivek943143 Oct 31, 2022
d4583bc
Create rotateimage.cpp
kumarvivek943143 Oct 31, 2022
6f613df
Create pivotinsortedarray.cpp
kumarvivek943143 Oct 31, 2022
5c506fe
Merge pull request #121 from kumarvivek943143/patch-9
sunnyshahabuddin Oct 31, 2022
691087f
Merge pull request #120 from kumarvivek943143/patch-8
sunnyshahabuddin Oct 31, 2022
6cf8650
Merge pull request #119 from kumarvivek943143/patch-7
sunnyshahabuddin Oct 31, 2022
1a1e008
Merge pull request #118 from kumarvivek943143/patch-6
sunnyshahabuddin Oct 31, 2022
28d3dbb
Merge pull request #117 from viveksingh8102000/patch-9
sunnyshahabuddin Oct 31, 2022
4769003
Merge pull request #116 from viveksingh8102000/patch-8
sunnyshahabuddin Oct 31, 2022
042da8e
Merge pull request #115 from viveksingh8102000/patch-7
sunnyshahabuddin Oct 31, 2022
0c08ebd
Merge pull request #114 from viveksingh8102000/patch-6
sunnyshahabuddin Oct 31, 2022
71d014b
Create targetsum.cpp
Ramannoby Oct 31, 2022
b8daedf
Create activityselection.cpp
Ramannoby Oct 31, 2022
febdc9a
Create circularmaxsubarray.cpp
Ramannoby Oct 31, 2022
5aa2a64
Create chewbaca.cpp
Ramannoby Oct 31, 2022
6ebe23e
Create brokencalulator.cpp
kumarvivek8 Oct 31, 2022
5d3a904
Create bookallocation.cpp
kumarvivek8 Oct 31, 2022
e68fe6a
Merge pull request #127 from kumarvivek8/patch-7
sunnyshahabuddin Oct 31, 2022
365830e
Merge pull request #126 from kumarvivek8/patch-6
sunnyshahabuddin Oct 31, 2022
5c73044
Merge pull request #125 from Ramannoby/patch-4
sunnyshahabuddin Oct 31, 2022
4d2642a
Merge pull request #124 from Ramannoby/patch-3
sunnyshahabuddin Oct 31, 2022
8910e4b
Merge pull request #123 from Ramannoby/patch-2
sunnyshahabuddin Oct 31, 2022
585f0c3
Merge pull request #122 from Ramannoby/patch-1
sunnyshahabuddin Oct 31, 2022
ae767e6
Create findingupperboundandlowerbound.cpp
kumarvivek8 Oct 31, 2022
daf456d
Create program4.cpp
kumarvivek8 Oct 31, 2022
6ce3fe6
Merge pull request #129 from kumarvivek8/patch-10
sunnyshahabuddin Oct 31, 2022
abcb58f
Merge pull request #128 from kumarvivek8/patch-9
sunnyshahabuddin Oct 31, 2022
1bfabf3
Create linked_list_simplified.c++
mstecrd Oct 20, 2023
44f9b5f
Create bst_simplified.c++
mstecrd Oct 20, 2023
4d41045
Create hash_map_simplified.c++
mstecrd Oct 20, 2023
61cf786
Create time_taken_code.c++
mstecrd Oct 20, 2023
4de25bb
Create stack_queue_simplified.c++
mstecrd Oct 20, 2023
9449759
Merge pull request #130 from mstecrd/patch-5
sunnyshahabuddin Oct 20, 2023
f142bb9
Merge pull request #134 from mstecrd/patch-9
sunnyshahabuddin Oct 20, 2023
5716a52
Merge pull request #133 from mstecrd/patch-8
sunnyshahabuddin Oct 20, 2023
06350d4
Merge pull request #132 from mstecrd/patch-7
sunnyshahabuddin Oct 20, 2023
0cb3949
Merge pull request #131 from mstecrd/patch-6
sunnyshahabuddin Oct 20, 2023
8fd2149
Create phonebook.cpp
sunnyshahabuddin0 Oct 27, 2023
18d754d
Create file_manipulation_with_C_plus_plus.cpp
sunnyshahabuddin0 Oct 27, 2023
7a66198
Create substring_check.cpp
aryanandarnav13 Oct 27, 2023
64a973a
Create shortest_distance_bw_cities.cpp
aryanandarnav13 Oct 27, 2023
5b4aea9
Create longest_common_subsequence.cpp
aryanandarnav13 Oct 27, 2023
8b2f935
Create lowest_common_ancestor.cpp
aryanandarnav13 Oct 27, 2023
881ffa8
Create multithreading.cpp
sunnyshahabuddin0 Oct 27, 2023
b88fb0a
Create todo.cpp
sunnyshahabuddin0 Oct 27, 2023
22cc983
Merge pull request #142 from sunnyshahabuddin0/patch-4
sunnyshahabuddin Oct 27, 2023
e80b020
Merge pull request #141 from sunnyshahabuddin0/patch-3
sunnyshahabuddin Oct 27, 2023
16c2ee3
Merge pull request #140 from aryanandarnav13/patch-5
sunnyshahabuddin Oct 27, 2023
e84aa5d
Merge pull request #139 from aryanandarnav13/patch-4
sunnyshahabuddin Oct 27, 2023
7da2cb6
Merge pull request #138 from aryanandarnav13/patch-3
sunnyshahabuddin Oct 27, 2023
720bd2c
Merge pull request #137 from aryanandarnav13/patch-2
sunnyshahabuddin Oct 27, 2023
1b3b2f9
Merge pull request #136 from sunnyshahabuddin0/patch-2
sunnyshahabuddin Oct 27, 2023
83caadc
Merge pull request #135 from sunnyshahabuddin0/patch-1
sunnyshahabuddin Oct 27, 2023
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
39 changes: 39 additions & 0 deletions Array_gcd_pranshu.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// C++ program to find GCD of two or
// more numbers
#include <bits/stdc++.h>
using namespace std;

// Function to return gcd of a and b
int gcd(int a, int b)
{
if (a == 0)
return b;
return gcd(b % a, a);
}

// Function to find gcd of array of
// numbers
int findGCD(int arr[], int n)
{
int result = arr[0];
for (int i = 1; i < n; i++)
{
result = gcd(arr[i], result);

if(result == 1)
{
return 1;
}
}
return result;
}

// Driver code
int main()
{
int arr[] = { 2, 4, 6, 8, 16 };
int n = sizeof(arr) / sizeof(arr[0]);
cout << findGCD(arr, n) << endl;
return 0;
}

69 changes: 69 additions & 0 deletions BST/bst_simplified.c++
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#include <iostream>

class Node {
public:
int data;
Node* left;
Node* right;

Node(int data) {
this->data = data;
this->left = nullptr;
this->right = nullptr;
}
};

class BST {
public:
Node* root;

BST() {
root = nullptr;
}

void insert(int data) {
root = insertRecursive(root, data);
}

Node* insertRecursive(Node* current, int data) {
if (current == nullptr) {
return new Node(data);
}
if (data < current->data) {
current->left = insertRecursive(current->left, data);
} else if (data > current->data) {
current->right = insertRecursive(current->right, data);
}
return current;
}

void displayInOrder() {
displayInOrderRecursive(root);
}

void displayInOrderRecursive(Node* current) {
if (current != nullptr) {
displayInOrderRecursive(current->left);
std::cout << current->data << " ";
displayInOrderRecursive(current->right);
}
}
};

int main() {
BST tree;

tree.insert(4);
tree.insert(2);
tree.insert(6);
tree.insert(1);
tree.insert(3);
tree.insert(5);
tree.insert(7);

std::cout << "In-order traversal: ";
tree.displayInOrder();
std::cout << std::endl;

return 0;
}
197 changes: 197 additions & 0 deletions Bidirectionalsearch.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
#include <bits/stdc++.h>
using namespace std;

// class representing undirected graph
// using adjacency list
class Graph
{
//number of nodes in graph
int V;

// Adjacency list
list<int> *adj;
public:
Graph(int V);
int isIntersecting(bool *s_visited, bool *t_visited);
void addEdge(int u, int v);
void printPath(int *s_parent, int *t_parent, int s,
int t, int intersectNode);
void BFS(list<int> *queue, bool *visited, int *parent);
int biDirSearch(int s, int t);
};

Graph::Graph(int V)
{
this->V = V;
adj = new list<int>[V];
};

// Method for adding undirected edge
void Graph::addEdge(int u, int v)
{
this->adj[u].push_back(v);
this->adj[v].push_back(u);
};

// Method for Breadth First Search
void Graph::BFS(list<int> *queue, bool *visited,
int *parent)
{
int current = queue->front();
queue->pop_front();
list<int>::iterator i;
for (i=adj[current].begin();i != adj[current].end();i++)
{
// If adjacent vertex is not visited earlier
// mark it visited by assigning true value
if (!visited[*i])
{
// set current as parent of this vertex
parent[*i] = current;

// Mark this vertex visited
visited[*i] = true;

// Push to the end of queue
queue->push_back(*i);
}
}
};

// check for intersecting vertex
int Graph::isIntersecting(bool *s_visited, bool *t_visited)
{
int intersectNode = -1;
for(int i=0;i<V;i++)
{
// if a vertex is visited by both front
// and back BFS search return that node
// else return -1
if(s_visited[i] && t_visited[i])
return i;
}
return -1;
};

// Print the path from source to target
void Graph::printPath(int *s_parent, int *t_parent,
int s, int t, int intersectNode)
{
vector<int> path;
path.push_back(intersectNode);
int i = intersectNode;
while (i != s)
{
path.push_back(s_parent[i]);
i = s_parent[i];
}
reverse(path.begin(), path.end());
i = intersectNode;
while(i != t)
{
path.push_back(t_parent[i]);
i = t_parent[i];
}

vector<int>::iterator it;
cout<<"*****Path*****\n";
for(it = path.begin();it != path.end();it++)
cout<<*it<<" ";
cout<<"\n";
};

// Method for bidirectional searching
int Graph::biDirSearch(int s, int t)
{
// boolean array for BFS started from
// source and target(front and backward BFS)
// for keeping track on visited nodes
bool s_visited[V], t_visited[V];

// Keep track on parents of nodes
// for front and backward search
int s_parent[V], t_parent[V];

// queue for front and backward search
list<int> s_queue, t_queue;

int intersectNode = -1;

// necessary initialization
for(int i=0; i<V; i++)
{
s_visited[i] = false;
t_visited[i] = false;
}

s_queue.push_back(s);
s_visited[s] = true;

// parent of source is set to -1
s_parent[s]=-1;

t_queue.push_back(t);
t_visited[t] = true;

// parent of target is set to -1
t_parent[t] = -1;

while (!s_queue.empty() && !t_queue.empty())
{
// Do BFS from source and target vertices
BFS(&s_queue, s_visited, s_parent);
BFS(&t_queue, t_visited, t_parent);

// check for intersecting vertex
intersectNode = isIntersecting(s_visited, t_visited);

// If intersecting vertex is found
// that means there exist a path
if(intersectNode != -1)
{
cout << "Path exist between " << s << " and "
<< t << "\n";
cout << "Intersection at: " << intersectNode << "\n";

// print the path and exit the program
printPath(s_parent, t_parent, s, t, intersectNode);
exit(0);
}
}
return -1;
}

// Driver code
int main()
{
// no of vertices in graph
int n=15;

// source vertex
int s=0;

// target vertex
int t=14;

// create a graph given in above diagram
Graph g(n);
g.addEdge(0, 4);
g.addEdge(1, 4);
g.addEdge(2, 5);
g.addEdge(3, 5);
g.addEdge(4, 6);
g.addEdge(5, 6);
g.addEdge(6, 7);
g.addEdge(7, 8);
g.addEdge(8, 9);
g.addEdge(8, 10);
g.addEdge(9, 11);
g.addEdge(9, 12);
g.addEdge(10, 13);
g.addEdge(10, 14);
if (g.biDirSearch(s, t) == -1)
cout << "Path don't exist between "
<< s << " and " << t << "\n";

return 0;
}
82 changes: 82 additions & 0 deletions Bipartite.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
//Bipartite Graph Test
//By coloring of nodes

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define f(i, a, n) for (i = a; i < n; i++)
#define fe(i, a, n) for (i = a; i <= n; i++)
#define w(x) \
int x; \
cin >> x; \
while (x--)
#define mod 1000000007
#define ps(x, y) fixed << setprecision(y) << x

void sks()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif

ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}

vector<int> adj[100001];
int vis[100001], col[100001];

bool dfs(int node, int c)
{
vis[node] = 1;
col[node] = c;
for (int child : adj[node])
{
if (vis[child] == 0)
{
bool temp = dfs(child, c ^ 1);
if (temp == false)
return false;
}

else
{
if (col[node] == col[child])
return false;
;
}
}

return true;
}

int main()
{
sks();

int n, e, a, b, i;
cin >> n >> e;

f(i, 0, e)
{
cin >> a >> b;
adj[a].pb(b);
adj[b].pb(a);
}

bool val = dfs(1, 1);

if (val == true)
cout << "Graph is Bipartite";
else
cout << "Graph is not Bipartite";

return 0;
}
Loading