MCPcopy Create free account

hub / github.com/anupam-kumar-krishnan/Competitive_Programming / functions

Functions2,161 in github.com/anupam-kumar-krishnan/Competitive_Programming

↓ 1 callersFunctioncheapestpath
All Data Structures/Arrays/Cheapest Path CodeChef.cpp:25
↓ 1 callersFunctioncheck
Coding Platforms(codechef,codeforces,etc)/Codeforces/1551C Interesting Story.cpp:6
↓ 1 callersFunctioncheck
* Given a string, check if all its characters are same or not. */
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Check_String.cpp:22
↓ 1 callersFunctioncheckEqual
All Algorithms/String algorithms/rabinKarpAlgorithm.cpp:26
↓ 1 callersFunctioncheckPalindrome
All Data Structures/Doubly_LL/palindrome.cpp:40
↓ 1 callersFunctioncheck_If_List_Is_Sorted
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:519
↓ 1 callersFunctioncombSort
Function to sort a[0..n-1] using Comb Sort
All Algorithms/Sorting Algorithm/comb_sort.cpp:17
↓ 1 callersFunctioncommonFactors
All Data Structures/Arrays/Number of common factor.cpp:6
↓ 1 callersFunctioncommonPrefix
All Data Structures/Trie/LCPtrie.cpp:88
↓ 1 callersMethodcompare
Coding Platforms(codechef,codeforces,etc)/CodeChef/September 2021 Long Challenge/Airline Restrictions/airline.cpp:8
↓ 1 callersFunctioncomputeLPSArray
All Algorithms/KMP_search_algorithm.cpp:39
↓ 1 callersFunctioncomputeTimeDifference
Basic Programming/Difference Between Two Time Period.cpp:32
↓ 1 callersFunctionconstructST
Function to construct segment tree from given array. This function allocates memory for segment tree and calls constructSTUtil() to fill the allocated
All Data Structures/Segment Tree/Lazy_Propagation.cpp:196
↓ 1 callersFunctionconstructSTUtil
A recursive function that constructs Segment Tree for array[ss..se]. si is index of current node in segment tree st.
All Data Structures/Segment Tree/Lazy_Propagation.cpp:169
↓ 1 callersFunctionconstructTrie
All Data Structures/Trie/LCPtrie.cpp:81
↓ 1 callersFunctionconvertBinaryToDecimal
Basic Programming/convert binary number to decimal.cpp:19
↓ 1 callersFunctionconvertToWave
* Given a sorted array arr[] of distinct integers. Sort the array into a wave-like array(In Place). * In other words, arrange the elements into a s
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Wave_Array.cpp:23
↓ 1 callersFunctioncountChildren
All Data Structures/Trie/LCPtrie.cpp:52
↓ 1 callersFunctioncountSetBits
Function to count the total number of set bits in `n`
All Algorithms/Brian Kernighan’s algorithm/Brian_Kernighan’s_algorithm.cpp:15
↓ 1 callersFunctioncountSort
All Data Structures/Sorting/CountSort.cpp:26
↓ 1 callersFunctioncountSort
The main function that sort the given string arr[] in alphabetical order
All Data Structures/Sorting/countingSort.cpp:10
↓ 1 callersFunctioncountSort
All Algorithms/Sorting Algorithm/Count_sort/count_sort.cpp:4
↓ 1 callersMethodcountSort
(int arr[], int n, int exp)
All Algorithms/Sorting Algorithm/radix_sort.java:20
↓ 1 callersFunctioncount_Number_Of_Nodes
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:397
↓ 1 callersFunctioncount_Number_Of_Nodes_Recursion
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:413
↓ 1 callersFunctioncount_leaves
DSA 450/Binary Search Tree/Bst-implementaion.cpp:72
↓ 1 callersFunctioncounting_sort
Basic Programming/counting Sort.cpp:12
↓ 1 callersFunctioncreate
All Data Structures/CircularLinkedList/circular_singly_linked_list.c:10
↓ 1 callersFunctioncreateDeque
All Data Structures/Queues/double-ended_queue(deque) .c:13
↓ 1 callersMethodcreateFromPreorder
All Data Structures/TREE/BST.cpp:236
↓ 1 callersFunctioncreateGraph
Creates a graph with V vertices and E edges
All Data Structures/GRAPHS/BellmanfordAlgo.cpp:20
↓ 1 callersFunctioncreateQueue
function to create a queue of given capacity. It initializes size of queue as 0
Basic Programming/queue.c:16
↓ 1 callersMethodcreateTree
()
All Data Structures/TREE/TreeImplementationLinkedList.java:15
↓ 1 callersFunctioncreatebst
All Data Structures/Binary Search Tree/One_way_right_threaded_BST.c:51
↓ 1 callersFunctioncubeRoot
* Given a number N, find the cube root of N. */
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Cube_root_number.cpp:22
↓ 1 callersFunctioncyclicSwapping
Basic Programming/SwapNumbersInCyclicOrder.cpp:3
↓ 1 callersFunctiondaqmatmul
All Algorithms/Algebraic algorithms/strassen_matrix.c:178
↓ 1 callersMethoddelNode
All Data Structures/Singly_LL/main.cpp:68
↓ 1 callersMethoddeleteBeg
All Data Structures/Doubly_LL/doubly.cpp:66
↓ 1 callersMethoddeleteEnd
All Data Structures/Doubly_LL/doubly.cpp:78
↓ 1 callersFunctiondeleteNode
Function to delete an element from the tree
All Data Structures/Queues/PriorityQueue.cpp:48
↓ 1 callersFunctiondeleteNode
Coding Platforms(codechef,codeforces,etc)/HackerRank/delete_a_node.cpp:92
↓ 1 callersFunctiondelete_After_Specific
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:310
↓ 1 callersFunctiondelete_Before_Specific
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:285
↓ 1 callersFunctiondelete_Specific
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:333
↓ 1 callersFunctiondelete_end
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:265
↓ 1 callersFunctiondelete_start
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:252
↓ 1 callersFunctiondeletenode
struct node
DSA 450/Binary Search Tree/Bst-implementaion.cpp:89
↓ 1 callersMethoddequeue
All Data Structures/Queues/ImplementCircularQueue.cpp:39
↓ 1 callersFunctiondetectLoop
Returns true if there is a loop in linked list else returns false.
Coding Platforms(codechef,codeforces,etc)/LeetCode/Detect loop in linked list_ayush91985.cpp:28
↓ 1 callersFunctiondfs
Simpler and adds elements to stack from end
All Data Structures/GRAPHS/DepthFirstSearchUsingSTL.cpp:40
↓ 1 callersFunctiondfs
All Algorithms/Graph Algorithm/LCA.cpp:8
↓ 1 callersFunctiondfs
Coding Platforms(codechef,codeforces,etc)/Codeforces/500D-NewYearSantaNetwork.cpp:7
↓ 1 callersFunctiondfs3
Coding Platforms(codechef,codeforces,etc)/Codeforces/Bakry_and_Partitioning.cpp:52
↓ 1 callersFunctiondijkstra
All Data Structures/GRAPHS/dijkstra.cpp:31
↓ 1 callersFunctiondijkstra
All Algorithms/Graph Algorithm/Dijkstra's Algorithm.cpp:25
↓ 1 callersFunctiondisplay
All Data Structures/Singly_LL/linkedlist.cpp:33
↓ 1 callersFunctiondisplay
All Data Structures/Doubly_LL/palindrome.cpp:31
↓ 1 callersMethoddisplay
All Data Structures/Doubly_LL/doubly.cpp:52
↓ 1 callersFunctiondisplayArray
All Data Structures/Arrays/5) Move All Negative Elements To One Side of The Array.cpp:16
↓ 1 callersFunctiondisplayTheLinkedList
All Data Structures/Singly_LL/menu_based_singly_linked_list.cpp:587
↓ 1 callersFunctiondist
All Algorithms/Graph Algorithm/LCA.cpp:30
↓ 1 callersFunctiondistance
* Given coordinates of 2 points on a cartesian plane, find the distance between them rounded up to nearest integer. */
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Distance_between_two_point.cpp:22
↓ 1 callersMethoddoUnions
DSA 450/Arrays/6. Union of two arrays.cpp:5
↓ 1 callersMethodeggDrop
Function to find minimum number of attempts needed in order to find the critical floor.
DSA 450/Dynamic Programming/Egg_Dropping_Puzzle.cpp:10
↓ 1 callersFunctionencodeTheName
* CBI agents are investigating a case in which they came across certain names of the culprits. They decided to encode the names into the number format
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Encoding_Names.cpp:24
↓ 1 callersFunctioneulerTree
All Algorithms/Graph Algorithm/Euler Tour Algorithm.cpp:17
↓ 1 callersFunctionevenlyDivides
* Given a number N. Count the number of digits in N which evenly divides N. */
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Count_Digits.cpp:22
↓ 1 callersFunctionexploreDFS
All Data Structures/GRAPHS/island_count.cpp:9
↓ 1 callersFunctionfascinating
* Given a number N. Your task is to check whether it is fascinating or not. Fascinating Number: When a number(should contain 3 digits or more) is mult
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Fascinating_Number.cpp:22
↓ 1 callersMethodfindKthSmallest
All Data Structures/Binary Search Tree/CreateBinarySearchTree.cpp:53
↓ 1 callersMethodfindLPSLength
(String str)
All Algorithms/Dynamic Programming/LIS/Longest_Palindromic_Subsequence.java:2
↓ 1 callersFunctionfindLongestConseqSubseq
All Data Structures/Arrays/17) Longest consecutive subsequence.cpp:22
↓ 1 callersMethodfindLongestIncreasingSubsequence
(int[] arr, int n)
All Algorithms/Dynamic Programming/LIS/LongestIncreasingSubsequence_Recursive.java:22
↓ 1 callersFunctionfindOnce
* Given a sorted array arr[] of size N. Find the element that appears only once in the array. All other elements appear exactly twice. */
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Element_Appear_first_Sorted.cpp:22
↓ 1 callersFunctionfindPeak
All Data Structures/Arrays/peak_element.cpp:5
↓ 1 callersFunctionfindRepeatFirstN2
DSA 450/String/FirstRepeated.cpp:7
↓ 1 callersFunctionfindSingle
* In a party of N people, each person is denoted by an integer. Couples are represented by the same number. Find out the only single person in the par
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Party_couple.cpp:22
↓ 1 callersFunctionfindSpiral
Function to return a list containing the level order traversal in spiral form.
All Data Structures/TREE/Level_Order_Traversal_in_Spiral_Form.cpp:129
↓ 1 callersFunctionfind_index
* Given an unsorted array Arr[] of N integers and a Key which is present in this array. You need to write a program to find the start index( index whe
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Find_index.cpp:22
↓ 1 callersFunctionfirstElementKTime
* Given an array of N integers. Find the first element that occurs at least K number of times. */
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/First_element_to_occur_Ktime.cpp:23
↓ 1 callersFunctionfirstNonRepeating
* Find the first non-repeating element in a given array arr of N integers. * Note: Array consists of only positive and negative integers and not ze
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Non_Repeating_element.cpp:23
↓ 1 callersFunctionfirstRepeated
* Given an array arr[] of size n, find the first repeating element. The element should occurs more than once and the index of its first occurrence sho
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/First_repeating_element.cpp:22
↓ 1 callersFunctionfloydWarshall
Implementing floyd warshall algorithm
All Data Structures/GRAPHS/FloydWarshall.cpp:14
↓ 1 callersFunctionfo
Coding Platforms(codechef,codeforces,etc)/Codeforces/1742B.cpp:25
↓ 1 callersFunctionfree_singly_linked_list
Coding Platforms(codechef,codeforces,etc)/HackerRank/insert_node_at_tail.cpp:44
↓ 1 callersFunctionfree_singly_linked_list
Coding Platforms(codechef,codeforces,etc)/HackerRank/insert_node_at_head.cpp:46
↓ 1 callersFunctionfree_singly_linked_list
Coding Platforms(codechef,codeforces,etc)/HackerRank/delete_a_node.cpp:62
↓ 1 callersFunctionfrn
Coding Platforms(codechef,codeforces,etc)/Codeforces/B_1705.cpp:29
↓ 1 callersFunctionfrn
Coding Platforms(codechef,codeforces,etc)/Codeforces/A_1696.cpp:29
↓ 1 callersFunctionfrn
Coding Platforms(codechef,codeforces,etc)/Codeforces/B_1647.cpp:16
↓ 1 callersFunctionfrn
Coding Platforms(codechef,codeforces,etc)/Codeforces/C_1618.cpp:29
↓ 1 callersFunctionfront
Function to get front of queue
Basic Programming/queue.c:70
↓ 1 callersMethodfrontElement
All Data Structures/Queues/queueUsingLinkedList.cpp:43
↓ 1 callersFunctiongcd
Basic Programming/euclid_gcd.cpp:4
↓ 1 callersFunctiongcd
Coding Platforms(codechef,codeforces,etc)/Codeforces/910C.cpp:147
↓ 1 callersFunctiongcd
Coding Platforms(codechef,codeforces,etc)/Codeforces/920E.cpp:222
↓ 1 callersFunctiongcd
Coding Platforms(codechef,codeforces,etc)/Codeforces/Password.cpp:16
↓ 1 callersFunctiongetGray
* You are given a decimal number n. You need to find the gray code of the number n and convert it into decimal. * Gray code is a binary numeral sys
Coding Platforms(codechef,codeforces,etc)/GeeksforGeeks/Gray_Code.cpp:24
↓ 1 callersMethodgetHead
All Data Structures/Singly_LL/main.cpp:53
← previousnext →301–400 of 2,161, ranked by callers