HackerRank icon indicating copy to clipboard operation
HackerRank copied to clipboard

HackerRank solutions in Java/JS/Python/C++/C#

Results 105 HackerRank issues
Sort by recently updated
recently updated
newest added

if max has reached the maximum possible value that is max == s, then there is no need to continue the loop

Added all the solutions in Algorithms/Warmup either in C or Python or both

import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int...

Alternative solution to milatry time problem

nlogn for drives and mlogm for keyboard. So, if you sort both independently, shouldn't it be mlogm+nlogn , instead of (m+n)log(m+n) ?

question

because it works fine with the hackerrank solution