Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VamsiSangam/theoryofprogramming
/ functions
Functions
258 in github.com/VamsiSangam/theoryofprogramming
⨍
Functions
258
◇
Types & classes
72
↓ 58 callers
Method
getChild
(int index)
Tree Data Structures/N-ary Tree/Java/NaryTreeNode.java:40
↓ 34 callers
Method
addChild
(NaryTreeNode node)
Tree Data Structures/N-ary Tree/Java/NaryTreeNode.java:24
↓ 25 callers
Method
print
()
Tree Data Structures/Compressed Trie Tree/Java/Trie.java:87
↓ 13 callers
Function
print
A utility function used for Inorder Walk
Tree Data Structures/Segment Trees/C/segment-tree.c:65
↓ 12 callers
Method
addEdge
(int v, int w)
Graph Theory/Depth First Search Algorithm/Java/Graph.java:34
↓ 11 callers
Method
addEdge
(int v, int w)
Graph Theory/Breadth First Search Algorithm/Java/Graph.java:34
↓ 9 callers
Method
getChildren
()
Tree Data Structures/Trie Tree/Java/Trie.java:174
↓ 8 callers
Method
insertWord
(TrieNode root, String word)
Tree Data Structures/Trie Tree/Java/TrieTreeSimple.java:42
↓ 7 callers
Method
insert
(String word)
Tree Data Structures/Trie Tree/Java/Trie.java:25
↓ 6 callers
Function
addEdge
Adds an edge to an Adjacency List element
Graph Theory/Prim's Algorithm/C/prims-algorithm.c:27
↓ 6 callers
Method
hasPlayerWon
(int[][] game, int player)
Artificial Intelligence/MiniMax Algorithm with Alpha-Beta Pruning/Java/MiniMaxWithAlphaBetaPruning.java:163
↓ 6 callers
Method
hasPlayerWon
(int[][] game, int player)
Artificial Intelligence/MiniMax Algorithm/Java/MiniMaxAlgorithm.java:147
↓ 6 callers
Method
print
(Node[] adjacencyList)
Graph Theory/Adjcacency List/Java/AdjacencyList.java:117
↓ 6 callers
Method
queryWord
(TrieNode root, String word)
Tree Data Structures/Trie Tree/Java/TrieTreeSimple.java:59
↓ 5 callers
Method
insert
(String word)
Tree Data Structures/Compressed Trie Tree/Java/Trie.java:24
↓ 5 callers
Method
startsWith
(String prefix)
Tree Data Structures/Trie Tree/Java/Trie.java:96
↓ 4 callers
Function
jumpSearch
Searching Algorithms/Jump Search Algorithm/C++/JumpSearch.cpp:18
↓ 4 callers
Function
jumpSearch
Searching Algorithms/Jump Search Algorithm/C/jump-search.c:19
↓ 4 callers
Function
jumpSearch
Searching Algorithms/Jump Search Algorithm/C/optimised-jump-search.c:48
↓ 4 callers
Method
jumpSearch
(int[] arr, int val)
Searching Algorithms/Jump Search Algorithm/Java/OptimisedJumpSearch.java:23
↓ 4 callers
Method
jumpSearch
(int[] arr, int val)
Searching Algorithms/Jump Search Algorithm/Java/JumpSearch.java:23
↓ 4 callers
Function
jump_search
(alist, val)
Searching Algorithms/Jump Search Algorithm/Python/JumpSearch.py:15
↓ 4 callers
Function
min
Searching Algorithms/Jump Search Algorithm/C/jump-search.c:15
↓ 4 callers
Method
strCopy
(CharSequence str, int index)
Tree Data Structures/Compressed Trie Tree/Java/Trie.java:77
↓ 3 callers
Function
binarySearch
(alist, item)
Searching Algorithms/Binary Search Algorithm/Python/BinarySearch.py:9
↓ 3 callers
Method
delete
(String word)
Tree Data Structures/Trie Tree/Java/Trie.java:59
↓ 3 callers
Method
isTerminalState
(int[][] game)
Artificial Intelligence/MiniMax Algorithm with Alpha-Beta Pruning/Java/MiniMaxWithAlphaBetaPruning.java:159
↓ 3 callers
Method
isTerminalState
(int[][] game)
Artificial Intelligence/MiniMax Algorithm/Java/MiniMaxAlgorithm.java:143
↓ 3 callers
Function
merge_sort
(array)
Sorting Algorithms/Merge Sort Algorithm/Python/MergeSort.py:13
↓ 3 callers
Method
print
(NaryTreeNode root)
Tree Data Structures/N-ary Tree/Java/NaryTreeNode.java:48
↓ 3 callers
Function
replace
Replaces the value of an edge (u -->) v to (u --> v') newNodes the entire list of adjacencyList[u] => O(|E|) operation Here, "v" is stored as "oldVert
Graph Theory/Snakes and Ladders Game Code/C/snakes-and-ladders.c:74
↓ 3 callers
Method
search
(String word)
Tree Data Structures/Trie Tree/Java/Trie.java:85
↓ 2 callers
Method
BFSExplore
(LinkedList< Integer >[] adjacencyList, LinkedList<Integer> queue, int[] parent)
Artificial Intelligence/Bidirectional Search/Java/BidirectionalSearch.java:87
↓ 2 callers
Method
IDDFS
(NaryTreeNode node, int maxDepth, NaryTreeNode goal)
Artificial Intelligence/Iterative Deepening Depth First Search/Java/IterativeDeepeningDepthFirstSearch.java:54
↓ 2 callers
Function
addEdge
Inserts Node to the Linked List by Head Insertion - O(1) Returns address of head which is the newly created node.
Graph Theory/Adjcacency List/C/adjacency-list.c:22
↓ 2 callers
Function
extractMin
Returns the element with Minimum Priority and deletes it
Graph Theory/Prim's Algorithm/C/prims-algorithm.c:112
↓ 2 callers
Function
factorial
Returns (n! % PRIME)
Math/Modular Arithmetic/C/modular-arithmetic.c:17
↓ 2 callers
Method
getCharacter
()
Tree Data Structures/Trie Tree/Java/Trie.java:162
↓ 2 callers
Method
getParent
()
Tree Data Structures/Trie Tree/Java/Trie.java:170
↓ 2 callers
Function
heapify
Applies the heapify procedure - O(log N)
Tree Data Structures/Binary Heaps/C/binary-heap.c:51
↓ 2 callers
Function
heapify
Applies the heapify procedure - O(log N)
Graph Theory/Dijkstra's Algorithm/C/dijkstras-algorithm-using-binary-heap.c:42
↓ 2 callers
Function
inOrderWalk
In-Order Walk of Segment Tree
Tree Data Structures/Segment Trees/C/segment-tree.c:71
↓ 2 callers
Function
insert
Graph Theory/Breadth First Search Algorithm/C/breadth-first-search.c:20
↓ 2 callers
Method
isLeaf
()
Tree Data Structures/Trie Tree/Java/Trie.java:182
↓ 2 callers
Function
lexicographicalPrint
Prints the 'trieTree' in a Pre-Order or a DFS manner which automatically results in a Lexicographical Order
Tree Data Structures/Trie Tree/C++/trie-tree-using-stl.cpp:146
↓ 2 callers
Method
maxTurn
(int[][] game, int depth, int alpha, int beta)
Artificial Intelligence/MiniMax Algorithm with Alpha-Beta Pruning/Java/MiniMaxWithAlphaBetaPruning.java:83
↓ 2 callers
Method
maxTurn
(int[][] game, int depth)
Artificial Intelligence/MiniMax Algorithm/Java/MiniMaxAlgorithm.java:83
↓ 2 callers
Method
maxValueOfRod
(int n, int[] price, HashMap<Integer, Integer> cache)
Dynamic Programming/Rod Cutting/Java/RodCutting.java:24
↓ 2 callers
Method
minTurn
(int[][] game, int depth, int alpha, int beta)
Artificial Intelligence/MiniMax Algorithm with Alpha-Beta Pruning/Java/MiniMaxWithAlphaBetaPruning.java:122
↓ 2 callers
Method
minTurn
(int[][] game, int depth)
Artificial Intelligence/MiniMax Algorithm/Java/MiniMaxAlgorithm.java:114
↓ 2 callers
Method
printAdjacencyList
Prints the Adjacency List
Graph Theory/Adjcacency List/C#/AdjacencyList.cs:64
↓ 2 callers
Method
printGame
(int[][] game)
Artificial Intelligence/MiniMax Algorithm with Alpha-Beta Pruning/Java/MiniMaxWithAlphaBetaPruning.java:219
↓ 2 callers
Method
printGame
(int[][] game)
Artificial Intelligence/MiniMax Algorithm/Java/MiniMaxAlgorithm.java:203
↓ 2 callers
Method
printMaze
(int[][] maze)
Backtracking/Maze Solver/Java/MazeSolver.java:123
↓ 2 callers
Function
replaceEdgeFor6PreceedingVertices
Graph Theory/Snakes and Ladders Game Code/C++/SnakesAndLadders.cpp:20
↓ 2 callers
Method
score
(int[][] game, int depth)
Artificial Intelligence/MiniMax Algorithm with Alpha-Beta Pruning/Java/MiniMaxWithAlphaBetaPruning.java:197
↓ 2 callers
Method
score
(int[][] game, int depth)
Artificial Intelligence/MiniMax Algorithm/Java/MiniMaxAlgorithm.java:181
↓ 2 callers
Method
search
(String word)
Tree Data Structures/Compressed Trie Tree/Java/Trie.java:107
↓ 2 callers
Method
searchNode
(String word)
Tree Data Structures/Trie Tree/Java/Trie.java:119
↓ 2 callers
Method
setParent
(TrieNode parent)
Tree Data Structures/Trie Tree/Java/Trie.java:166
↓ 2 callers
Method
startsWith
(String prefix)
Tree Data Structures/Compressed Trie Tree/Java/Trie.java:138
↓ 1 callers
Function
DFS
Graph Theory/Depth First Search Algorithm/C/depth-first-search.c:55
↓ 1 callers
Function
DFSExplore
Graph Theory/Depth First Search Algorithm/C/depth-first-search.c:33
↓ 1 callers
Method
DLS
(NaryTreeNode node, NaryTreeNode goal, int depth)
Artificial Intelligence/Iterative Deepening Depth First Search/Java/IterativeDeepeningDepthFirstSearch.java:70
↓ 1 callers
Function
Insert
Tree Data Structures/Trie Tree/C++/trie-tree-spoj-phonelst.cpp:28
↓ 1 callers
Function
_partition
(alist, start, end)
Sorting Algorithms/Quick Sort Algorithm/Python/QuickSort.py:32
↓ 1 callers
Function
_quick_sort_helper
(alist, start, end)
Sorting Algorithms/Quick Sort Algorithm/Python/QuickSort.py:18
↓ 1 callers
Function
add
Adds a new edge into the Adjacency List Follows Head Insertion for O(1) Insertion
Graph Theory/Bellman Ford Algorithm/C/bellman-ford.c:36
↓ 1 callers
Function
add
Graph Theory/Depth First Search Algorithm/C/depth-first-search.c:20
↓ 1 callers
Function
addEdge
Follows head insertion to give O(1) insertion
Graph Theory/Dijkstra's Algorithm/C/dijkstras-algorithm-using-binary-heap.c:30
↓ 1 callers
Function
addEdge
Follows head insertion to give O(1) insertion
Graph Theory/Dijkstra's Algorithm/C/dijkstras-algorithm.c:23
↓ 1 callers
Function
addEdge
Adds a new edge, u --> v, to adjacencyList[u]
Graph Theory/Snakes and Ladders Game Code/C/snakes-and-ladders.c:21
↓ 1 callers
Method
addEdge
Adds a new node in the linked list. Follows head insertion for O(1) performance. @param oldHead head of the linked list to which new node is to be ad
Graph Theory/Adjcacency List/Java/AdjacencyList.java:79
↓ 1 callers
Method
addEdgeAtEnd
Appends a new Edge to the linked list
Graph Theory/Adjcacency List/C#/AdjacencyList.cs:33
↓ 1 callers
Function
addVertex
Adds an element to the heap and returns the size - O(log N)
Tree Data Structures/Binary Heaps/C/binary-heap.c:21
↓ 1 callers
Function
bellmanFord
Bellman-Ford Algorithm which takes the Graph (adjacencyList[]), starting vertex (startVertex), and an empty array shortestDistances[] as input. It app
Graph Theory/Bellman Ford Algorithm/C/bellman-ford.c:50
↓ 1 callers
Method
bfs
(int source)
Graph Theory/Breadth First Search Algorithm/Java/Graph.java:40
↓ 1 callers
Method
bidirectionalSearch
(LinkedList< Integer >[] adjacencyList, int source, int goal)
Artificial Intelligence/Bidirectional Search/Java/BidirectionalSearch.java:53
↓ 1 callers
Function
binarySearch
Main Binary Search logic
Searching Algorithms/Binary Search Algorithm/C++/binary-search.cpp:18
↓ 1 callers
Function
binarySearch
Searching Algorithms/Binary Search Algorithm/C/binary-search.c:14
↓ 1 callers
Method
binarySearch
(int arr[], int val)
Searching Algorithms/Binary Search Algorithm/Java/BinarySearch.java:14
↓ 1 callers
Function
breadthFirstSearch
Graph Theory/Snakes and Ladders Game Code/C++/SnakesAndLadders.cpp:39
↓ 1 callers
Function
breadthFirstSearch
Graph Theory/Snakes and Ladders Game Code/C/snakes-and-ladders.c:31
↓ 1 callers
Function
breadthFirstSearch
Graph Theory/Breadth First Search Algorithm/C++/breadth-first-search-using-queue.cpp:30
↓ 1 callers
Function
breadthFirstSearch
Graph Theory/Breadth First Search Algorithm/C++/breadth-first-search-using-stl.cpp:19
↓ 1 callers
Function
breadth_first_search
Graph Theory/Breadth First Search Algorithm/C/breadth-first-search.c:34
↓ 1 callers
Function
bubbleUp
This makes the neccessary adjustments after insertion to ensure the validity of Heap Property in the Binary Heap
Tree Data Structures/Binary Heaps/C++/binary-heap-using-struct.cpp:72
↓ 1 callers
Function
buildHeap
Build Heap Procedure - O(N)
Tree Data Structures/Binary Heaps/C/binary-heap.c:142
↓ 1 callers
Function
buildHeap
Build Heap Procedure - O(N)
Graph Theory/Dijkstra's Algorithm/C/dijkstras-algorithm-using-binary-heap.c:87
↓ 1 callers
Function
buildSegmentTree
The recursive procedure which actually constructs the Segment Tre
Tree Data Structures/Segment Trees/C/segment-tree.c:23
↓ 1 callers
Method
computeAndPlayBestMove
(int[][] game, int player)
Artificial Intelligence/MiniMax Algorithm with Alpha-Beta Pruning/Java/MiniMaxWithAlphaBetaPruning.java:67
↓ 1 callers
Method
computeAndPlayBestMove
(int[][] game, int player)
Artificial Intelligence/MiniMax Algorithm/Java/MiniMaxAlgorithm.java:67
↓ 1 callers
Function
decreaseKey
Searches for a node in the Heap in O(1) time and decreases its value Then calls Heapify() on it's parent to adjust heap -> totally takes O(log N) time
Graph Theory/Dijkstra's Algorithm/C/dijkstras-algorithm-using-binary-heap.c:98
↓ 1 callers
Method
deleteEdge
(Node adjacencyList, Node edgeToBeRemoved)
Graph Theory/Adjcacency List/Java/AdjacencyList.java:87
↓ 1 callers
Function
deleteNode
Deletes and entry in the Priority Queue
Graph Theory/Prim's Algorithm/C/prims-algorithm.c:97
↓ 1 callers
Function
deleteVertex
Deletes the vertex and returns the size - O(log N)
Tree Data Structures/Binary Heaps/C/binary-heap.c:105
↓ 1 callers
Method
dfs
()
Graph Theory/Depth First Search Algorithm/Java/Graph.java:40
↓ 1 callers
Method
dfsUtil
(int v, boolean visited[])
Graph Theory/Depth First Search Algorithm/Java/Graph.java:53
↓ 1 callers
Function
dijkstra
Dijkstra's Algorithm function
Graph Theory/Dijkstra's Algorithm/C++/dijkstras-algorithm.cpp:31
↓ 1 callers
Function
dijkstra
Dijkstra's Algorithm function
Graph Theory/Dijkstra's Algorithm/C/dijkstras-algorithm-using-binary-heap.c:137
next →
1–100 of 258, ranked by callers