Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BlakeBrown/HackerRank-Solutions
/ functions
Functions
371 in github.com/BlakeBrown/HackerRank-Solutions
⨍
Functions
371
◇
Types & classes
50
↓ 1 callers
Function
main
()
30 Days of Code/Day 11/2D Arrays.js:36
↓ 1 callers
Function
main
()
30 Days of Code/Day 07/Arrays.js:27
↓ 1 callers
Function
main
()
30 Days of Code/Day 10/Binary Numbers.js:43
↓ 1 callers
Function
main
()
30 Days of Code/Day 03/Intro to Conditional Statements.js:27
↓ 1 callers
Function
main
()
30 Days of Code/Day 02/Operators.js:32
↓ 1 callers
Function
main
()
30 Days of Code/Day 01/Data Types.js:22
↓ 1 callers
Function
main
()
30 Days of Code/Day 05/Loops.js:27
↓ 1 callers
Function
main
()
30 Days of Code/Day 09/Recursion 3.js:36
↓ 1 callers
Function
main
()
30 Days of Code/Day 12/Inheritence.js:76
↓ 1 callers
Function
main
()
30 Days of Code/Day 04/Class vs. Instance.js:45
↓ 1 callers
Function
makeEqualLength
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 callers
Function
makeEqualLength
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 callers
Function
maxConsecutiveOnes
(x)
30 Days of Code/Day 10/Binary Numbers.js:25
↓ 1 callers
Function
mutate_string
(string, position, character)
Python/Mutations.py:1
↓ 1 callers
Function
numOps
Finds # of operations to take away n chocolates from one person
Algorithms/Dynamic Programming/Equal - O(n) greedy.cpp:10
↓ 1 callers
Method
numWords
(String str)
Algorithms/Strings/CamelCase.java:15
↓ 1 callers
Function
numberToString
Contests/Project Euler/017.cpp:215
↓ 1 callers
Function
partition
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 callers
Function
partition
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 callers
Function
permute
Useful Code Blocks/Print Permutations.cpp:24
↓ 1 callers
Method
popCharacter
(self)
30 Days of Code/Day 18/Queue and stacks.py:9
↓ 1 callers
Function
possible
Algorithms/Searching/Gena Playing Hanoi.cpp:17
↓ 1 callers
Method
power
(self, n, p)
30 Days of Code/Day 17/More exceptions.py:3
↓ 1 callers
Function
printEvenIndexChar
30 Days of Code/Day 06/Let's Review.c:3
↓ 1 callers
Function
printOddIndexChar
30 Days of Code/Day 06/Let's Review.c:12
↓ 1 callers
Function
printPermutations
Useful Code Blocks/Print Permutations.cpp:40
↓ 1 callers
Method
printPerson
()
30 Days of Code/Day 12/Inheritence.js:21
↓ 1 callers
Method
printPerson
()
30 Days of Code/Day 12/Inheritence.rb:7
↓ 1 callers
Function
printPowerSet
Powerset = set of all subsets
Useful Code Blocks/Print Powerset (all subsets).cpp:9
↓ 1 callers
Function
print_full_name
(a, b)
Python/What's Your Name?.py:1
↓ 1 callers
Function
processData
(input)
30 Days of Code/Day 08/Dictionaries and Maps.js:1
↓ 1 callers
Function
processData
(input)
30 Days of Code/Day 06/Let's Review.js:4
↓ 1 callers
Method
pushCharacter
(self, char)
30 Days of Code/Day 18/Queue and stacks.py:12
↓ 1 callers
Function
quickSort
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 callers
Function
quickSort
Performs an in-place quicksort using a Lomuto partition scheme
Algorithms/Sorting/Running Time of Quicksort.cpp:47
↓ 1 callers
Function
quickSort
Performs an in-place quicksort using a Lomuto partition scheme
Algorithms/Sorting/Quicksort 3.cpp:27
↓ 1 callers
Function
ransom_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 callers
Function
readLine
()
30 Days of Code/Day 11/2D Arrays.js:21
↓ 1 callers
Function
readLine
()
30 Days of Code/Day 10/Binary Numbers.js:21
↓ 1 callers
Function
readLine
()
30 Days of Code/Day 03/Intro to Conditional Statements.js:21
↓ 1 callers
Function
readLine
()
30 Days of Code/Day 05/Loops.js:21
↓ 1 callers
Function
readLine
()
30 Days of Code/Day 09/Recursion 3.js:23
↓ 1 callers
Function
removeDuplicates
30 Days of Code/Day 24/More Linked List.c:15
↓ 1 callers
Function
reverseArray
(arr)
Data Structures/01. Arrays/001. Arrays - DS.py:5
↓ 1 callers
Function
rtrim
Algorithms/Bit Manipulation/Sum vs XOR.cpp:51
↓ 1 callers
Function
smallestFibTerm
Returns the first term in the fibonacci sequence to contain N digits (for large N)
Contests/Project Euler/025.cpp:15
↓ 1 callers
Function
solve
(meal_cost, tip_percent, tax_percent)
30 Days of Code/Day 02/Operators.js:26
↓ 1 callers
Function
split
Contests/2016 - Booking.com Backend/Good Memories.cpp:10
↓ 1 callers
Function
split_string
Algorithms/Sorting/Counting sort2.cpp:65
↓ 1 callers
Function
split_string
Algorithms/Sorting/Find the Median.cpp:46
↓ 1 callers
Function
sumProperDivisors
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 callers
Function
sumProperDivisors
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 callers
Function
sumSubstring
(n)
Algorithms/Dynamic Programming/Sam and Sub-strings.py:1
↓ 1 callers
Function
sumXor
Complete the sumXor function below.
Algorithms/Bit Manipulation/Sum vs XOR.cpp:9
↓ 1 callers
Method
super_reduced_string
(String s)
Algorithms/Strings/Super Reduced String.java:9
↓ 1 callers
Function
visit
Algorithms/Searching/Connected Cell in a Grid.cpp:15
↓ 1 callers
Method
visitIsland
(int[][] matrix, int x, int y)
Useful Code Blocks/Java/islands.java:9
Method
Node
()
Useful Code Blocks/Java/Tries - Contacts.java:13
Function
Person
(initialAge)
30 Days of Code/Day 04/Class vs. Instance.js:21
Method
Trie
()
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
Function
binaryToHex
Useful Code Blocks/Hex to Binary.cpp:46
Function
checkBST
Tutorials/Cracking the Coding Interview/Trees - Is this a Binary Search Tree?.cpp:23
Function
comp
Helper function to sort an array lexicographically decreasing
Algorithms/Greedy/Two Arrays.cpp:9
Function
comp
Useful Code Blocks/Sorting.cpp:11
Method
constructor
(firstName, lastName, identification)
30 Days of Code/Day 12/Inheritence.js:15
Method
constructor
(firstName, lastName, id, scores = [])
30 Days of Code/Day 12/Inheritence.js:39
Function
dayOfTheWeek
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
Method
display
(self)
30 Days of Code/Day 13/Abstract Classes.py:17
Method
divisorSum
(n)
30 Days of Code/Day 19/Interfaces.py:2
Function
edgeComparison
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
Function
edgeComparison
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
Method
get_array
()
30 Days of Code/Day 27/Testing.py:19
Method
get_array
()
30 Days of Code/Day 27/Testing.py:31
Method
get_expected_result
()
30 Days of Code/Day 27/Testing.py:36
Function
has_cycle
Tutorials/Cracking the Coding Interview/Linked Lists - Detect a Cycle.cpp:11
Function
hexToBinary
==== 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
Method
initialize
data
30 Days of Code/Day 15/Linked List.rb:5
Method
initialize
(firstName, lastName, id)
30 Days of Code/Day 12/Inheritence.rb:2
Method
initialize
(firstName, lastName, id, scores)
30 Days of Code/Day 12/Inheritence.rb:13
Function
isPrime
Useful Code Blocks/Primality Test.cpp:20
Function
lexographicPermutation
Returns the Nth lexographic permutation of a lexographically sorted string s with unique characters
Useful Code Blocks/Lexographic Algorithms.cpp:85
Function
main
Mathematics/Combinatorics/nCr Table.cpp:9
Function
main
Algorithms/Sorting/Quicksort 2.cpp:46
Function
main
Algorithms/Sorting/Insertion Sort - Part 2.cpp:29
Function
main
Algorithms/Sorting/Closest Numbers.cpp:13
Function
main
Algorithms/Sorting/Counting sort2.cpp:27
Function
main
Algorithms/Sorting/Running Time of Quicksort.cpp:56
Function
main
Algorithms/Sorting/Quicksort 3.cpp:41
Function
main
Algorithms/Sorting/Find the Median.cpp:16
Function
main
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
Function
main
Algorithms/Bit Manipulation/Sum vs XOR.cpp:22
Function
main
Algorithms/Bit Manipulation/Lonely Integer.cpp:33
Function
main
Algorithms/Bit Manipulation/A or B.cpp:74
Function
main
Algorithms/Warmup/solveMeFirst.cpp:5
Function
main
Algorithms/Warmup/Compare the Triplets.cpp:27
← previous
next →
101–200 of 371, ranked by callers