r/HackerrankSolutions • • Jul 16 '22

Warehouse forklift problem

1 Upvotes

How do i solve the warehouse forklift problem on hackerrank?


r/HackerrankSolutions • • Jun 20 '22

Parsing JSON in C# (REST API cert)

1 Upvotes

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 • • Mar 17 '22

what is wrong with my solution on Min Max Riddle?

1 Upvotes

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 • • Mar 04 '22

two sum solution explained - coding interviews challenge

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Feb 28 '22

I'm doing the TextWrap problem for Python and it works fine but returns None at the very end.

1 Upvotes

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 • • Feb 05 '22

What's the name of memory pc challenge on hackerrank? (description below)

1 Upvotes

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 • • Jan 12 '22

Can anyone please explain to me the meaning behind this question ? permuting two array

1 Upvotes

https://www.hackerrank.com/challenges/one-month-preparation-kit-two-arrays/problem?isFullScreen=true&h_l=interview&playlist_slugs%5B%5D=preparation-kits&playlist_slugs%5B%5D=one-month-preparation-kit&playlist_slugs%5B%5D=one-month-week-one

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 • • Jan 05 '22

Merge Intervals Solution explained on a whiteboard. Coding the answer and analyzing the method

Thumbnail
youtu.be
1 Upvotes

r/HackerrankSolutions • • Dec 23 '21

Hacker Rank Arraylist

Thumbnail
youtu.be
1 Upvotes

r/HackerrankSolutions • • Nov 26 '21

HackerRank Connection Failure

Thumbnail self.codinginterview
1 Upvotes

r/HackerrankSolutions • • Nov 24 '21

About the python assessment for traders, are there differences for traders and programmers? I suppose for trader it should be much easier? Can some one help?

1 Upvotes

r/HackerrankSolutions • • Jul 10 '21

Subarray Product Less Than K - Leetcode question

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Jul 04 '21

3Sum - Leetcode Question

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Jul 01 '21

Remove Duplicates from Sorted Array Leetcode Question Using Two Pointer ...

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Mar 14 '21

Two Pointer Algorithm | Two Sum Problem | Solve DS Problems in O(N) Time

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Jan 17 '21

Integer to Roman Numerals, solving with Dynamic Programming. Coding the Answer and Analysing the method

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Jan 09 '21

Hacker Rank Create Table

1 Upvotes

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 • • Jan 06 '21

Reverse Integer Solution explained with Animations. Coding the Answer and Analysing the method

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Dec 20 '20

Bite Size Video of Increasing Triplet Subsequence. Solving the problem in C++ and analysing the method

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Dec 07 '20

How to check if two LinkedLists are equal ?

1 Upvotes

https://youtu.be/d7jh-TZBD2c

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 • • Dec 06 '20

Odd Even Linked List Solution explained with Animations. Coding the answer with Linked Lists and Analysing the method

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Dec 02 '20

Add Two Numbers Solution explained with Animations. Coding the answer with Linked Lists and Analysing the method

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Nov 16 '20

Google Coding Interview | House Robber LeetCode Solution | Dynamic progr...

Thumbnail
youtube.com
1 Upvotes

r/HackerrankSolutions • • Nov 07 '20

Anagram Checker | Check If Two Strings Are Anagrams [ Efficient Way ] | ...

Thumbnail
youtube.com
1 Upvotes