r/HackerrankSolutions • • Jan 20 '22

do you experience that the hackerrank website is very slow this week?

7 Upvotes

Hackerrank website is relatively slow when I type codes or switch between pages, but it was ok. since 2 or 3 days the speed is so slow it seems not normal anymore. Do you have such issuse? or is it my pc RAM needs to be updated?


r/HackerrankSolutions • • May 06 '21

hackerrank intellisense not working

7 Upvotes

Im using java 7/8 in hackerrank and there is not even an option to enable intellisense . When i switch to a language like c++ i see the option but nothing for java. Is there any fix to this? I know ive used the autocomplete feature before on hackerrank but im not sure if they just removed it?


r/HackerrankSolutions • • Jan 17 '22

30 DAYS - HACKERRANK - BITWISE AND

3 Upvotes

I got the solution already (got it from github), but I'd like to know why this works to solve the Task

Given set S = {1,2,...N} . Find two integers from the set A, B where A < B, such that the value of A&B is the maximum possible and also less than a given integer K, . In this case, & represents the bitwise AND operator.

Solution down below

def bitwiseAnd(N, K):
return ( K-1 if ( (K-1) | K) <= N else K-2 )

Can someone explain, TIA.


r/HackerrankSolutions • • Feb 28 '21

𝗟𝗲𝗮𝗿𝗻 𝘁𝗵𝗲 𝗺𝗼𝘀𝘁 𝗲𝗮𝘀𝗶𝗲𝘀𝘁 𝘄𝗮𝘆 𝗮𝗹𝗴𝗼𝗿𝗶𝘁𝗵𝗺 𝘁𝗼 𝗶𝗺𝗽𝗹𝗲𝗺𝗲𝗻𝘁 𝗺𝗲𝗿𝗴𝗲 𝘀𝗼𝗿𝘁

Thumbnail
youtube.com
3 Upvotes

r/HackerrankSolutions • • Oct 27 '20

Compare the triplets hackerrank Solution

3 Upvotes

Compare the triplets HackerRank solution in java | Compare the triplets hackerrank solution

This is 3rd problem from hackerrank Practice | Algorithms | Warmup | Compare the triplets Please watch till end to understand the concept and logic behind the java solution.

I have tried to explain it in a simple way and I hope you all will be able to understand in that way. Please let us know about this video in comments section.

Subscribe to #codedecks today for awesome videos 👨‍💻

https://youtu.be/46SWRZ_yFvc


r/HackerrankSolutions • • Jun 01 '22

HackerRank tips help!

2 Upvotes

Hello all,

I have been grinding on easy questions from Hackrrank and feel like I'm getting nowhere. I can't seem to turn the physical answer to these questions into code. What are some tips to beat this habit?


r/HackerrankSolutions • • Feb 13 '22

Clarifications on Assessments done on Hackerrank

2 Upvotes

I recently did a few OAs on Hackerrank. My question is this: I understand that once you press submit on a code, it is submitted. It is only logical. But after, let us say you press modify and begin modifying your code, running custom tests and the "Run All Tests" without pressing submit. Then, time runs out without you pressing submit again. Does the submitted code get considered or your modified code? I think it would make sense to consider any unsubmitted code, only if there were no submissions. Otherwise, I think it makes sense to consider the last submitted code only. How does it work? Thanks


r/HackerrankSolutions • • Dec 31 '21

Can someone tell me what is wrong with this? It is failing all the tests. This question is pretty straightforward.

Post image
2 Upvotes

r/HackerrankSolutions • • Sep 05 '21

Difference between IDE and COMPILER

2 Upvotes

I know the basic difference between them but I couldn't under the main difference. So far as I know is IDE is used for software development and compiler TRANSLATE the source code written in IDE or text editor. And in IDE compiler is already there like other terminology linker,syntax etc.

But what we called those who we use online As compiler or online ide ❓❓❓❓❓❓❓❓


r/HackerrankSolutions • • Jul 16 '21

Linked List Cycle with Captain America

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Jul 12 '21

4Sum - Leetcode

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Mar 18 '21

Python Basics

2 Upvotes

Hey everyone! I Just found out about this website and I only began to study python the other day. I was doing some practice codes and at the Moment I am doing the arithmetic operators ones. I wrote a correct code for 'test case 0' but when It comes down to 'test case 1" no matter what It won't accept my result, even though the computations are right. Has anybody else experienced this?


r/HackerrankSolutions • • Jan 29 '21

Programming assessments

2 Upvotes

Hello everyone, I have applied to many places and got back with the invitation for programming assessments, when I do sample test they seem to be pretty easy when I take original assessment I got rejected. Anyone else has the same problem?


r/HackerrankSolutions • • Jan 24 '21

java problem pls help

2 Upvotes

import java.io.*;

import java.math.*;

import java.security.*;

import java.text.*;

import java.util.*;

import java.util.concurrent.*;

import java.util.regex.*;

public class Solution {

// Complete the largestPermutation function below.

static int[] largestPermutation(int k, int[] arr) {

int count = 0;

Map<Integer, Integer> map = new HashMap<>();

for (int i = 0; i < arr.length; i++) {

map.put(arr[i], map.getOrDefault(arr[i], 1) +1);

}

for (Integer key : map.keySet()) {

map.put(key, map.get(key) - 1);

if (map.containsKey(key - k) && map.get(key - k) > 0) count++;

map.put(key, map.get(key) + 1);

}

return count;

}

private static final Scanner scanner = new Scanner(System.in);

public static void main(String[] args) throws IOException {

BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));

String[] nk = scanner.nextLine().split(" ");

int n = Integer.parseInt(nk[0]);

int k = Integer.parseInt(nk[1]);

int[] arr = new int[n];

String[] arrItems = scanner.nextLine().split(" ");

scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");

for (int i = 0; i < n; i++) {

int arrItem = Integer.parseInt(arrItems[i]);

arr[i] = arrItem;

}

int[] result = largestPermutation(k, arr);

for (int i = 0; i < result.length; i++) {

bufferedWriter.write(String.valueOf(result[i]));

if (i != result.length - 1) {

bufferedWriter.write(" ");

}

}

bufferedWriter.newLine();

bufferedWriter.close();

scanner.close();

}

}


r/HackerrankSolutions • • Jan 17 '21

Master the Art of 𝗗𝘆𝗻𝗮𝗺𝗶𝗰 𝗣𝗿𝗼𝗴𝗿𝗮𝗺𝗺𝗶𝗻𝗴

2 Upvotes

Master the 𝗗𝘆𝗻𝗮𝗺𝗶𝗰 𝗣𝗿𝗼𝗴𝗿𝗮𝗺𝗺𝗶𝗻𝗴 Skills by solving most common 𝗗𝘆𝗻𝗮𝗺𝗶𝗰 𝗣𝗿𝗼𝗴𝗿𝗮𝗺𝗺𝗶𝗻𝗴 𝗶𝗻𝘁𝗲𝗿𝘃𝗶𝗲𝘄 𝗾𝘂𝗲𝘀𝘁𝗶𝗼𝗻𝘀.

Once you practice these problems, you will be able to solve most of the 𝗱𝗽 𝗽𝗿𝗼𝗯𝗹𝗲𝗺𝘀 𝘄𝗵𝗶𝗰𝗵 𝗳𝗼𝗹𝗹𝗼𝘄𝘀 𝘁𝗵𝗲 𝘀𝗶𝗺𝗶𝗹𝗮𝗿 𝗽𝗮𝘁𝘁𝗲𝗿𝗻.

𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 : https://www.youtube.com/watch?v=_l9Yx4olAYM&list=PLSIpQf0NbcClDpWE58Y-oSJro_W3LO8Nb


r/HackerrankSolutions • • Dec 27 '20

𝗠𝗮𝘀𝘁𝗲𝗿 𝘁𝗵𝗲 𝗮𝗿𝘁 𝗼𝗳 𝗿𝗲𝗰𝘂𝗿𝘀𝗶𝗼𝗻 𝗷𝘂𝘀𝘁 𝗶𝗻 𝗮𝗻 𝗵𝗼𝘂𝗿

2 Upvotes

r/HackerrankSolutions • • Dec 27 '20

Do we have to complete 10 days of statistics in 10 days or can we do it at our own pace?

2 Upvotes

r/HackerrankSolutions • • Dec 13 '20

Top 5 Algorithms Every Competitive Programmer Must Know

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Nov 29 '20

Length Of The Longest Consecutive 1s In Binary Representation Of A Numbe...

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Aug 09 '20

Amazon Coding Interview | Longest Common Substring Dynamic programming |...

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Aug 02 '20

Python Tutor | Java Visualizer -Visualize Code Execution Of C Java JavaS...

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Jul 25 '20

Head Recursion | Tail Recursion | Head VS Tail Recursion | EP3

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Jul 12 '20

Recursion Tree Visualization | Memory Visualization | How Recursion Work...

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Jul 05 '20

Recursion In Data Structures | Recursion Explained | EP1

Thumbnail
youtube.com
2 Upvotes

r/HackerrankSolutions • • Dec 23 '19

Python Tutor Java Visualizer Visualize Code Execution Of C Java JavaScr...

Thumbnail
youtube.com
2 Upvotes