MCPcopy Create free account

hub / github.com/BlakeBrown/HackerRank-Solutions / functions

Functions371 in github.com/BlakeBrown/HackerRank-Solutions

↓ 1 callersFunctionmain
()
30 Days of Code/Day 11/2D Arrays.js:36
↓ 1 callersFunctionmain
()
30 Days of Code/Day 07/Arrays.js:27
↓ 1 callersFunctionmain
()
30 Days of Code/Day 10/Binary Numbers.js:43
↓ 1 callersFunctionmain
()
30 Days of Code/Day 03/Intro to Conditional Statements.js:27
↓ 1 callersFunctionmain
()
30 Days of Code/Day 02/Operators.js:32
↓ 1 callersFunctionmain
()
30 Days of Code/Day 01/Data Types.js:22
↓ 1 callersFunctionmain
()
30 Days of Code/Day 05/Loops.js:27
↓ 1 callersFunctionmain
()
30 Days of Code/Day 09/Recursion 3.js:36
↓ 1 callersFunctionmain
()
30 Days of Code/Day 12/Inheritence.js:76
↓ 1 callersFunctionmain
()
30 Days of Code/Day 04/Class vs. Instance.js:45
↓ 1 callersFunctionmakeEqualLength
Helper method: given two unequal sized bit strings, converts them to same length by aadding leading 0s in the smaller string. Returns the the new leng
Algorithms/Graph Theory/Roads in Hackerland.cpp:22
↓ 1 callersFunctionmakeEqualLength
Helper method: given two unequal sized bit strings, converts them to same length by aadding leading 0s in the smaller string. Returns the the new leng
Contests/2016 - June World Codesprint/Roads in Hackerland.cpp:22
↓ 1 callersFunctionmaxConsecutiveOnes
(x)
30 Days of Code/Day 10/Binary Numbers.js:25
↓ 1 callersFunctionmutate_string
(string, position, character)
Python/Mutations.py:1
↓ 1 callersFunctionnumOps
Finds # of operations to take away n chocolates from one person
Algorithms/Dynamic Programming/Equal - O(n) greedy.cpp:10
↓ 1 callersMethodnumWords
(String str)
Algorithms/Strings/CamelCase.java:15
↓ 1 callersFunctionnumberToString
Contests/Project Euler/017.cpp:215
↓ 1 callersFunctionpartition
Helper method for quicksort Partition an array so that all elements less than a pivot appear before the elements that are greater than the pivot Retur
Algorithms/Sorting/Running Time of Quicksort.cpp:25
↓ 1 callersFunctionpartition
Helper method for quicksort Partition an array so that all elements less than a pivot appear before the elements that are greater than the pivot Retur
Algorithms/Sorting/Quicksort 3.cpp:7
↓ 1 callersFunctionpermute
Useful Code Blocks/Print Permutations.cpp:24
↓ 1 callersMethodpopCharacter
(self)
30 Days of Code/Day 18/Queue and stacks.py:9
↓ 1 callersFunctionpossible
Algorithms/Searching/Gena Playing Hanoi.cpp:17
↓ 1 callersMethodpower
(self, n, p)
30 Days of Code/Day 17/More exceptions.py:3
↓ 1 callersFunctionprintEvenIndexChar
30 Days of Code/Day 06/Let's Review.c:3
↓ 1 callersFunctionprintOddIndexChar
30 Days of Code/Day 06/Let's Review.c:12
↓ 1 callersFunctionprintPermutations
Useful Code Blocks/Print Permutations.cpp:40
↓ 1 callersMethodprintPerson
()
30 Days of Code/Day 12/Inheritence.js:21
↓ 1 callersMethodprintPerson
()
30 Days of Code/Day 12/Inheritence.rb:7
↓ 1 callersFunctionprintPowerSet
Powerset = set of all subsets
Useful Code Blocks/Print Powerset (all subsets).cpp:9
↓ 1 callersFunctionprint_full_name
(a, b)
Python/What's Your Name?.py:1
↓ 1 callersFunctionprocessData
(input)
30 Days of Code/Day 08/Dictionaries and Maps.js:1
↓ 1 callersFunctionprocessData
(input)
30 Days of Code/Day 06/Let's Review.js:4
↓ 1 callersMethodpushCharacter
(self, char)
30 Days of Code/Day 18/Queue and stacks.py:12
↓ 1 callersFunctionquickSort
Question requires you to do a non "in-place" quick sort Sorting questions on HackerRank aren't the best...
Algorithms/Sorting/Quicksort 2.cpp:6
↓ 1 callersFunctionquickSort
Performs an in-place quicksort using a Lomuto partition scheme
Algorithms/Sorting/Running Time of Quicksort.cpp:47
↓ 1 callersFunctionquickSort
Performs an in-place quicksort using a Lomuto partition scheme
Algorithms/Sorting/Quicksort 3.cpp:27
↓ 1 callersFunctionransom_note
Put every word from the magazine in a hash table, check if every word from the ransom is in the hash table
Tutorials/Cracking the Coding Interview/Hash Tables - Ransom Note.cpp:29
↓ 1 callersFunctionreadLine
()
30 Days of Code/Day 11/2D Arrays.js:21
↓ 1 callersFunctionreadLine
()
30 Days of Code/Day 10/Binary Numbers.js:21
↓ 1 callersFunctionreadLine
()
30 Days of Code/Day 03/Intro to Conditional Statements.js:21
↓ 1 callersFunctionreadLine
()
30 Days of Code/Day 05/Loops.js:21
↓ 1 callersFunctionreadLine
()
30 Days of Code/Day 09/Recursion 3.js:23
↓ 1 callersFunctionremoveDuplicates
30 Days of Code/Day 24/More Linked List.c:15
↓ 1 callersFunctionreverseArray
(arr)
Data Structures/01. Arrays/001. Arrays - DS.py:5
↓ 1 callersFunctionrtrim
Algorithms/Bit Manipulation/Sum vs XOR.cpp:51
↓ 1 callersFunctionsmallestFibTerm
Returns the first term in the fibonacci sequence to contain N digits (for large N)
Contests/Project Euler/025.cpp:15
↓ 1 callersFunctionsolve
(meal_cost, tip_percent, tax_percent)
30 Days of Code/Day 02/Operators.js:26
↓ 1 callersFunctionsplit
Contests/2016 - Booking.com Backend/Good Memories.cpp:10
↓ 1 callersFunctionsplit_string
Algorithms/Sorting/Counting sort2.cpp:65
↓ 1 callersFunctionsplit_string
Algorithms/Sorting/Find the Median.cpp:46
↓ 1 callersFunctionsumProperDivisors
Returns the sum of proper divisors of N This is useful: https://en.wikipedia.org/wiki/Divisor_function Note the difference between sig[0] (number of d
Contests/Project Euler/023.cpp:14
↓ 1 callersFunctionsumProperDivisors
Returns the sum of proper divisors of N This is useful: https://en.wikipedia.org/wiki/Divisor_function Note the difference between sig[0] (number of d
Contests/Project Euler/021.cpp:14
↓ 1 callersFunctionsumSubstring
(n)
Algorithms/Dynamic Programming/Sam and Sub-strings.py:1
↓ 1 callersFunctionsumXor
Complete the sumXor function below.
Algorithms/Bit Manipulation/Sum vs XOR.cpp:9
↓ 1 callersMethodsuper_reduced_string
(String s)
Algorithms/Strings/Super Reduced String.java:9
↓ 1 callersFunctionvisit
Algorithms/Searching/Connected Cell in a Grid.cpp:15
↓ 1 callersMethodvisitIsland
(int[][] matrix, int x, int y)
Useful Code Blocks/Java/islands.java:9
MethodNode
()
Useful Code Blocks/Java/Tries - Contacts.java:13
FunctionPerson
(initialAge)
30 Days of Code/Day 04/Class vs. Instance.js:21
MethodTrie
()
Useful Code Blocks/Java/Tries - Contacts.java:21
Method__init__
(self,data)
30 Days of Code/Day 23/BST Level-Order Traversal.py:4
Method__init__
(self,data)
30 Days of Code/Day 22/Binary search tree.py:2
Method__init__
(self, a)
30 Days of Code/Day 14/Scope.py:2
Method__init__
(self)
30 Days of Code/Day 18/Queue and stacks.py:5
Method__init__
(self, title, author, price)
30 Days of Code/Day 13/Abstract Classes.py:13
FunctionbinaryToHex
Useful Code Blocks/Hex to Binary.cpp:46
FunctioncheckBST
Tutorials/Cracking the Coding Interview/Trees - Is this a Binary Search Tree?.cpp:23
Functioncomp
Helper function to sort an array lexicographically decreasing
Algorithms/Greedy/Two Arrays.cpp:9
Functioncomp
Useful Code Blocks/Sorting.cpp:11
Methodconstructor
(firstName, lastName, identification)
30 Days of Code/Day 12/Inheritence.js:15
Methodconstructor
(firstName, lastName, id, scores = [])
30 Days of Code/Day 12/Inheritence.js:39
FunctiondayOfTheWeek
Zeller's congruence: Returns an int representing the day 0 = saturday, 1 = sunday, 2 = monday, 3 = tuesday, 4 = wednesday, 5 = thursday, 6 = friday
Useful Code Blocks/Zeller's Congruence.cpp:3
Methoddisplay
(self)
30 Days of Code/Day 13/Abstract Classes.py:17
MethoddivisorSum
(n)
30 Days of Code/Day 19/Interfaces.py:2
FunctionedgeComparison
Compare two edges according to their weights Used in qsort() for sorting an array of edges
Algorithms/Graph Theory/Kruskal's MST - Really Special Subtree.cpp:64
FunctionedgeComparison
Compare two edges according to their weights Used in qsort() for sorting an array of edges
Contests/2015 - World Cup, University Level CodeSprint/Travel in Hackerland.cpp:61
Methodget_array
()
30 Days of Code/Day 27/Testing.py:19
Methodget_array
()
30 Days of Code/Day 27/Testing.py:31
Methodget_expected_result
()
30 Days of Code/Day 27/Testing.py:36
Functionhas_cycle
Tutorials/Cracking the Coding Interview/Linked Lists - Detect a Cycle.cpp:11
FunctionhexToBinary
==== HEX TO BINARY ===== Method 1 (recommended): O(l) memory & runtime, where l is the length of the hex string
Useful Code Blocks/Hex to Binary.cpp:3
Methodinitialize
data
30 Days of Code/Day 15/Linked List.rb:5
Methodinitialize
(firstName, lastName, id)
30 Days of Code/Day 12/Inheritence.rb:2
Methodinitialize
(firstName, lastName, id, scores)
30 Days of Code/Day 12/Inheritence.rb:13
FunctionisPrime
Useful Code Blocks/Primality Test.cpp:20
FunctionlexographicPermutation
Returns the Nth lexographic permutation of a lexographically sorted string s with unique characters
Useful Code Blocks/Lexographic Algorithms.cpp:85
Functionmain
Mathematics/Combinatorics/nCr Table.cpp:9
Functionmain
Algorithms/Sorting/Quicksort 2.cpp:46
Functionmain
Algorithms/Sorting/Insertion Sort - Part 2.cpp:29
Functionmain
Algorithms/Sorting/Closest Numbers.cpp:13
Functionmain
Algorithms/Sorting/Counting sort2.cpp:27
Functionmain
Algorithms/Sorting/Running Time of Quicksort.cpp:56
Functionmain
Algorithms/Sorting/Quicksort 3.cpp:41
Functionmain
Algorithms/Sorting/Find the Median.cpp:16
Functionmain
Stable counting sort Total runtime: O(n + k), where is n is the number of elements to sort and k is the size of the largest key
Algorithms/Sorting/The Full Counting Sort.cpp:11
Functionmain
Algorithms/Bit Manipulation/Sum vs XOR.cpp:22
Functionmain
Algorithms/Bit Manipulation/Lonely Integer.cpp:33
Functionmain
Algorithms/Bit Manipulation/A or B.cpp:74
Functionmain
Algorithms/Warmup/solveMeFirst.cpp:5
Functionmain
Algorithms/Warmup/Compare the Triplets.cpp:27
← previousnext →101–200 of 371, ranked by callers