Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
3cb6feb
added imp graph Algos
PranavKuruvella Oct 19, 2025
5f470d7
ADD: Solution to Maximum collection problem
Oct 19, 2025
324aa89
ADD: Solution to Unique Paths problem
Oct 19, 2025
43fa5d5
ADD: Solution to Gas station problem
Oct 19, 2025
c50a7dd
ADD: Solution to Non-Overlapping Intervals
Oct 19, 2025
ad273e6
ADD: Solution to Max sum Non-Adjacent numbers
Oct 19, 2025
f1dd3db
ADD: Solution to Rotting Oranges
Oct 19, 2025
768b1fb
leap year program in c
jc-kirthi Oct 19, 2025
d3be75e
factorial using recursion in C
jc-kirthi Oct 19, 2025
a16fd1a
Create chatbot
apragati331-lab Oct 19, 2025
70414a6
added linkedlist code in cpp
komal-k25 Oct 19, 2025
88cea76
Merge pull request #758 from DIXANTOFFICIAL1/main
ghostmkg Oct 20, 2025
a630f7d
Merge pull request #751 from komal-k25/my-code
ghostmkg Oct 20, 2025
d17478d
Merge pull request #750 from apragati331-lab/patch-5
ghostmkg Oct 20, 2025
e2139c8
Merge pull request #749 from jc-kirthi/change_2
ghostmkg Oct 20, 2025
cb3761d
Merge pull request #746 from DevaanshKathuria/new6
ghostmkg Oct 20, 2025
e6fe0d7
Merge pull request #745 from DevaanshKathuria/new5
ghostmkg Oct 20, 2025
6d8d148
Merge pull request #743 from DevaanshKathuria/new4
ghostmkg Oct 20, 2025
e4d111c
Merge pull request #742 from DevaanshKathuria/new3
ghostmkg Oct 20, 2025
ede091a
Merge pull request #741 from DevaanshKathuria/new2
ghostmkg Oct 20, 2025
cdd4c51
Merge pull request #740 from DevaanshKathuria/new1
ghostmkg Oct 20, 2025
a2a9d0d
Merge pull request #739 from PranavKuruvella/main
ghostmkg Oct 20, 2025
b5200d1
Add Dining Philosophers problem implementation
deba2k5 Oct 20, 2025
3b383d7
Roman to Integers
Tejassveer08 Oct 20, 2025
43e5411
Palindrome Program
Tejassveer08 Oct 20, 2025
91fcdec
Implement swimInWater function using union-find
swamini-jadhav Oct 20, 2025
9502297
Merge pull request #1 from swamini-jadhav/swamini-jadhav-patch-1
swamini-jadhav Oct 20, 2025
e1ecf8e
Add BMI calculator in BmiCalculator.cpp
Deb-cybe Oct 20, 2025
0daa5c0
added5 leetcode style pandas questions
AbhinavKondoju76 Oct 20, 2025
0c95983
Tic Tac Toe Game
Torqued-codes Oct 20, 2025
387b053
Merge pull request #761 from deba2k5/patch-1
ghostmkg Oct 22, 2025
501b468
Merge pull request #762 from Tejassveer08/main
ghostmkg Oct 22, 2025
b6740d1
Merge pull request #764 from Deb-cybe/patch-1
ghostmkg Oct 22, 2025
2ae234e
Merge pull request #765 from swamini-jadhav/main
ghostmkg Oct 22, 2025
468b0bc
Merge pull request #768 from Torqued-codes/main
ghostmkg Oct 22, 2025
503fbd4
Merge pull request #769 from AbhinavKondoju76/main
ghostmkg Oct 22, 2025
2357b84
Count Square Submatrices with All Ones
swamini-jadhav Oct 22, 2025
4cb0bcb
Merge branch 'ghostmkg:main' into feature_2
swamini-jadhav Oct 22, 2025
6d24684
Remove environment-file from conda workflow
swamini-jadhav Oct 22, 2025
fd2d5d6
Count Square Submatrices with All Ones
swamini-jadhav Oct 22, 2025
031c352
Add conda environment file
swamini-jadhav Oct 22, 2025
6e5949a
Add environment-file to conda workflow
swamini-jadhav Oct 22, 2025
00b0e8a
Create palindorme.py
laxmiamrutapadhi Oct 22, 2025
55aaadc
Added Tribonaci Series Python solution.
Oct 22, 2025
7a355f4
fixed
Oct 22, 2025
759c938
added Russian_doll_envelopes.py
kunal-10-cloud Oct 22, 2025
6c93be8
Added Number of Enclaves problem solution.
Oct 22, 2025
4e6aa9b
removing unwanted file
Oct 22, 2025
402efbc
added longest_biotonic_subsequences.py
kunal-10-cloud Oct 22, 2025
14766c8
Added Sum till Single Digit problem solution
Oct 22, 2025
7d4316b
added Detect cycle in an undirected graph.py
kunal-10-cloud Oct 22, 2025
6f78bba
removing unwanted file
Oct 22, 2025
2997c47
fixing
Oct 22, 2025
8da3390
Added Set Bits Count problem solution
Oct 22, 2025
7304d2d
Added Missing Number in an Array problem solution
Oct 22, 2025
696052b
fix
Oct 22, 2025
209c2d3
Added Checking Anagrams problem solution
Oct 22, 2025
5a34c30
added dijkstra.py
kunal-10-cloud Oct 22, 2025
0feb32a
Add problem statement to numEnclaves function
RishabhIIITD Oct 22, 2025
f47ae39
n-queens
ANANYA542 Oct 22, 2025
5c4a758
added kahn's.py
kunal-10-cloud Oct 22, 2025
d739e14
added knight_walk.py
ANANYA542 Oct 22, 2025
49c77d2
added lowest_common_ancestor
ANANYA542 Oct 22, 2025
c906a6f
added subset_with_sum_k.py
ANANYA542 Oct 22, 2025
b3d7cb9
added rat_in_maze.py
ANANYA542 Oct 22, 2025
307f67e
Merge pull request #774 from swamini-jadhav/main
ghostmkg Oct 23, 2025
45be1b3
Merge pull request #775 from laxmiamrutapadhi/main
ghostmkg Oct 23, 2025
c8c516f
Merge pull request #776 from RishabhIIITD/new1
ghostmkg Oct 23, 2025
8ce8ff2
Merge pull request #777 from kunal-10-cloud/russian_doll
ghostmkg Oct 23, 2025
d0aba3b
Merge pull request #779 from RishabhIIITD/new2
ghostmkg Oct 23, 2025
8de9d2b
Merge pull request #780 from kunal-10-cloud/longest_bitonic_subsequence
ghostmkg Oct 23, 2025
a940f0d
Merge pull request #781 from kunal-10-cloud/Detect_cycle
ghostmkg Oct 23, 2025
956a692
Merge pull request #782 from RishabhIIITD/new3
ghostmkg Oct 23, 2025
d94c3ef
Merge pull request #784 from RishabhIIITD/new5
ghostmkg Oct 23, 2025
1de737e
Merge pull request #788 from kunal-10-cloud/dijkstra
ghostmkg Oct 23, 2025
923bc84
Merge pull request #789 from ANANYA542/n-queens
ghostmkg Oct 23, 2025
24a76b2
Merge pull request #792 from kunal-10-cloud/kahn
ghostmkg Oct 23, 2025
cdf5db2
Merge pull request #794 from swamini-jadhav/feature_2
ghostmkg Oct 23, 2025
e6c32ed
Merge pull request #797 from ANANYA542/knight_walk
ghostmkg Oct 23, 2025
3f00ae7
Merge pull request #798 from ANANYA542/lowest_common_ancestor
ghostmkg Oct 23, 2025
6d307c3
Merge pull request #799 from ANANYA542/subset
ghostmkg Oct 23, 2025
c352857
Merge pull request #800 from ANANYA542/rat_in_maze
ghostmkg Oct 23, 2025
ffce4ac
Merge branch 'RishabhIIITD-new6'
ghostmkg Oct 23, 2025
107dd50
Merge branch 'main' of https://github.com/ghostmkg/programming-language
ghostmkg Oct 23, 2025
fbe3d6a
Merge branch 'new4' of https://github.com/RishabhIIITD/programming-la…
ghostmkg Oct 23, 2025
a96016b
Merge branch 'RishabhIIITD-new4'
ghostmkg Oct 23, 2025
86ffdb6
Added C Programs
farhanmallik05 Oct 23, 2025
bd0f2b3
Added C Programs
farhanmallik05 Oct 23, 2025
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
Binary file added .DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions .github/workflows/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: base
channels:
- defaults
dependencies:
- python=3.10
- pip
- flake8
- pytest
41 changes: 41 additions & 0 deletions C++ Code/bellman_ford.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#include <bits/stdc++.h>
using namespace std;

struct Edge {
int u, v, w;
};

void bellmanFord(int n, int start, vector<Edge>& edges) {
vector<int> dist(n, INT_MAX);
dist[start] = 0;

for (int i = 0; i < n - 1; i++) {
for (auto& e : edges) {
if (dist[e.u] != INT_MAX && dist[e.u] + e.w < dist[e.v]) {
dist[e.v] = dist[e.u] + e.w;
}
}
}

for (auto& e : edges) {
if (dist[e.u] != INT_MAX && dist[e.u] + e.w < dist[e.v]) {
cout << "Negative weight cycle detected!\n";
return;
}
}

cout << "Bellman-Ford Shortest Distances:\n";
for (int i = 0; i < n; i++)
cout << "Node " << i << ": " << dist[i] << endl;
}

int main() {
int n = 5;
vector<Edge> edges = {
{0, 1, -1}, {0, 2, 4}, {1, 2, 3}, {1, 3, 2},
{1, 4, 2}, {3, 2, 5}, {3, 1, 1}, {4, 3, -3}
};

bellmanFord(n, 0, edges);
return 0;
}
36 changes: 36 additions & 0 deletions C++ Code/bfs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include <bits/stdc++.h>
using namespace std;

void BFS(int start, vector<vector<int>>& adj) {
int n = adj.size();
vector<bool> visited(n, false);
queue<int> q;

visited[start] = true;
q.push(start);

cout << "BFS Traversal: ";
while (!q.empty()) {
int node = q.front();
q.pop();
cout << node << " ";

for (int neighbor : adj[node]) {
if (!visited[neighbor]) {
visited[neighbor] = true;
q.push(neighbor);
}
}
}
cout << endl;
}

int main() {
int n = 5;
vector<vector<int>> adj = {
{1, 2}, {0, 3, 4}, {0, 4}, {1}, {1, 2}
};

BFS(0, adj);
return 0;
}
30 changes: 30 additions & 0 deletions C++ Code/dfs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include <bits/stdc++.h>
using namespace std;

void DFSUtil(int node, vector<vector<int>>& adj, vector<bool>& visited) {
visited[node] = true;
cout << node << " ";

for (int neighbor : adj[node]) {
if (!visited[neighbor])
DFSUtil(neighbor, adj, visited);
}
}

void DFS(int start, vector<vector<int>>& adj) {
int n = adj.size();
vector<bool> visited(n, false);
cout << "DFS Traversal: ";
DFSUtil(start, adj, visited);
cout << endl;
}

int main() {
int n = 5;
vector<vector<int>> adj = {
{1, 2}, {0, 3, 4}, {0, 4}, {1}, {1, 2}
};

DFS(0, adj);
return 0;
}
47 changes: 47 additions & 0 deletions C++ Code/dijkstra.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include <bits/stdc++.h>
using namespace std;

void dijkstra(int start, vector<vector<pair<int, int>>>& adj) {
int n = adj.size();
vector<int> dist(n, INT_MAX);
dist[start] = 0;

priority_queue<pair<int, int>, vector<pair<int, int>>, greater<>> pq;
pq.push({0, start});

while (!pq.empty()) {
int d = pq.top().first;
int node = pq.top().second;
pq.pop();

if (d > dist[node]) continue;

for (auto& edge : adj[node]) {
int next = edge.first;
int weight = edge.second;

if (dist[node] + weight < dist[next]) {
dist[next] = dist[node] + weight;
pq.push({dist[next], next});
}
}
}

cout << "Dijkstra Shortest Distances:\n";
for (int i = 0; i < n; i++)
cout << "Node " << i << ": " << dist[i] << endl;
}

int main() {
int n = 5;
vector<vector<pair<int, int>>> adj(n);

adj[0] = {{1, 2}, {2, 4}};
adj[1] = {{2, 1}, {3, 7}};
adj[2] = {{4, 3}};
adj[3] = {{4, 1}};
adj[4] = {};

dijkstra(0, adj);
return 0;
}
Loading