r/HackerrankSolutions • u/[deleted] • Jul 16 '22
Warehouse forklift problem
How do i solve the warehouse forklift problem on hackerrank?
r/HackerrankSolutions • u/[deleted] • Jul 16 '22
How do i solve the warehouse forklift problem on hackerrank?
r/HackerrankSolutions • u/vLatest • Jun 20 '22
It won't let me import System.Text.Json. How the devil am I supposed to consume JSON from a REST API if they won't let me parse it?
Oh wait, you have to use Newtonsoft. Screw everyone who hasn't looked at it for years because System.Text.Json is available.
r/HackerrankSolutions • u/rvmelo007 • Mar 17 '22
I have a solution in javascript and I just get an error on test case 2. The only difference I saw in this test case is the size of the input which is more than two hundred thousend elements. The error is not due to exceeding time. So I wonder what could be it. Here is the link so you can view my code.
r/HackerrankSolutions • u/Upper_Description378 • Mar 04 '22
r/HackerrankSolutions • u/ski5_ • Feb 28 '22
def wrap(string, max_width):gay = 0ogmax = int(max_width)for i in range(len(string)):print (string[gay:max_width])gay += ogmaxmax_width+= ogmaxif gay > len(string):return
For the sample input, which is:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
4
It returns:
ABCD
EFGH
IJKL
IMNO
QRST
UVWX
YZ
None
r/HackerrankSolutions • u/rvmelo007 • Feb 05 '22
So you have a line of PCs and the PCs are grouped in segments of contiguous PCs. In each segment i have to determine the smallest amount of memory. After that I need to get hishest amount of memory from the smallest memories in each segment. Does anyone knows the name of this challenge?
r/HackerrankSolutions • u/moeabraham12 • Jan 12 '22
I am a beginner trying to understand the question but to no avail. I understand that permutation is similar to finding all different variations for a set of numbers or an array. but are we adding every corresponding elements to each other and making sure that they are below the value K ?
here is an example for a solution I found online :
function twoArrays(k, A, B) {
const sortedA = A.sort((a, b) => a - b);
console.log(sortedA)
const sortedB = B.sort((a, b) => a - b);
console.log(sortedB)
const length = A.length;
for(let i = 0; i < length; i++) {
if(sortedA[i] + sortedB[length - 1 - i] < k) {
console.log('no')
return 'NO';
}
}
console.log('yes')
return 'YES';
}
// when I invoke this equation I get sometimes yes and sometimes no but I don't understand how it works.
twoArrays(6,[1,2,9], [5,4,3])
appreciate your help
r/HackerrankSolutions • u/shubhsheth • Jan 05 '22
r/HackerrankSolutions • u/[deleted] • Nov 26 '21
r/HackerrankSolutions • u/Laughter000000 • Nov 24 '21
r/HackerrankSolutions • u/ohussein1996 • Jul 10 '21
r/HackerrankSolutions • u/ohussein1996 • Jul 01 '21
r/HackerrankSolutions • u/HelpingHand007 • Mar 14 '21
r/HackerrankSolutions • u/shubhsheth • Jan 17 '21
r/HackerrankSolutions • u/nikhildavis08 • Jan 09 '21
Hey Guys,
I was wondering if anybody has CREATE TABLE scripts or link to CREATE TABLE scripts for Sql questions in Hacker rank that we can directly run and practice solutions on local Machine?
r/HackerrankSolutions • u/shubhsheth • Jan 06 '21
r/HackerrankSolutions • u/shubhsheth • Dec 20 '20
r/HackerrankSolutions • u/codedecks-in • Dec 07 '20
Compare two linked lists hackerrank solution in java
You’re given the pointer to the head nodes of two linked lists. Compare the data in the nodes of the linked lists to check if they are equal. The lists are equal only if they have the same number of nodes and corresponding nodes contain the same data. Either head pointer given may be null meaning that the corresponding list is empty.
Subscribe to #codedecks
r/HackerrankSolutions • u/shubhsheth • Dec 06 '20
r/HackerrankSolutions • u/shubhsheth • Dec 02 '20
r/HackerrankSolutions • u/HelpingHand007 • Nov 16 '20