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...
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...
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....
C++ : Explanation: Basically, this is like a tic tac toe puzzle. It goes something like this for a 3 by 3: [0][0] [0][1] [0][2][1][0] [1][1] [1][2][2][0] [2][1] [2][2] But first, we check...
C++: Explanation: Just summing up the value of each vector and adding it to result. At the end, return result.
C++ : Explanation: A bit of hard coding here, not the most elegant solution. But hey it works. The for loop compares each number in both vectors a and b at index i...
C++ : Explanation: Seriously no explanation for this one. Just follow the instructions in the comments.