Category: C++

08
Jan
2020

Hackerrank Time Conversion (C++)

C++ : Explanation: Ok, this problem gave quite some headaches with the corner cases of 12PM and 12AM. Had to use some hackos to see the corner cases missed. But first, the general...

07
Jan
2020

Hackerrank Mini-Max Sum (C++)

C++ : Explanation: Using a nested for loop here, the outer loop denotes the number to skip when summing the vector, for the first loop, skip arr[0], then arr[1]… etc. The inner loops...

07
Jan
2020

Hackerrank Staircase (C++)

C++ : Explanation: This is one of our favorites. Used to print stars (*) in school assignments previously, now we are printing hashtags (#). The loop for j is to take care of...

07
Jan
2020

Hackerrank Plus Minus (C++)

C++ : Explanation: pos is the number of positive integers in the vector, neg is the number of negative integers in the vector, and zero is the number of zeros in the vector....