Step 1 – Launch the HackerRank Website and “Sign In”. Ref: https://www.hackerrank.com/

Step 2 – Click into “Continue Preparation” under Problem Solving. Choose “Simple Array Sum” Challenge.

Step 3 – Read the Instructions Carefully.

Change the Programming Language to Python 3.

Step 4 – List the Requirements and Constraints in a Notepad in simple words. Learn to take notes.

Step 5 – Convert What You Understand of the Requirements and Constraints into code.

In this case the logic for computing the sum of all elements in the list is a common need.

Most programming languages have a command word to conduct this problem solving.

For Python, the command is sum(array).

Step 6 – Click “Run Code” to Test Your Code. Do Note if you submit code with errors, you will lose points. So “Run Code” first to ensure everything works.

Step 7 – Once you have tested that your code works, “Submit Code” to clear the challenge and earn some Hacker points.

Leave a Reply

Your email address will not be published. Required fields are marked *