Day8 Dictionaries and Maps

Objective

Today, we’re learning about Key-Value pair mappings using a Map or Dictionary data structure. Check out the Tutorial tab for learning materials and an instructional video!


Task

Given n names and phone numbers, assemble a phone book that maps friends’ names to their respective phone numbers. You will then be given an unknown number of names to query your phone book for. For each name queried, print the associated entry from your phone book on a new line in the form name=phoneNumber; if an entry for name is not found, print Not found instead.

Note: Your phone book should be a Dictionary/Map/HashMap data structure.


Day7 Arrays

Objective

Today, we’re learning about the Array data structure. Check out the Tutorial tab for learning materials and an instructional video!


Task

Given an array, A, of N integers, print A‘s elements in reverse order as a single line of space-separated numbers.


Day6 Let's Review

Objective

Today we’re expanding our knowledge of Strings and combining it with what we’ve already learned about loops. Check out the Tutorial tab for learning materials and an instructional video!


Task

Given a string, S, of length N that is indexed from 0 to N - 1, print its even-indexed and odd-indexed characters as 2 space-separated strings on a single line (see the Sample below for more detail).

Note: 0 is considered to be an even index.


Day5 Loops

Objective

In this challenge, we’re going to use loops to help us do some simple math. Check out the Tutorial tab to learn more.


Task

Given an integer, n, print its first 10 multiples. Each multiple n x i (where 1 <= i <= 10) should be printed on a new line in the form: n x i = result.


Day4 Class vs. Instance

Objective

In this challenge, we’re going to learn about the difference between a class and an instance; because this is an Object Oriented concept, it’s only enabled in certain languages. Check out the Tutorial tab for learning materials and an instructional video!


Day3 Intro to Conditional Statements

Objective

In this challenge, we’re getting started with conditional statements. Check out the Tutorial tab for learning materials and an instructional video!


Day2 Operators

Objective

In this challenge, you’ll work with arithmetic operators. Check out the Tutorial tab for learning materials and an instructional video!


Task

Given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent (the percentage of the meal price being added as tax) for a meal, find and print the meal’s total cost.

Note: Be sure to use precise values for your calculations, or you may end up with an incorrectly rounded result!


Day1 Data Types

Objective

Today, we’re discussing data types. Check out the Tutorial tab for learning materials and an instructional video!


Day0 Hello World

Objective

In this challenge, we review some basic concepts that will get you started with this series. You will need to use the same (or similar) syntax to read input and write output in challenges throughout HackerRank. Check out the Tutorial tab for learning materials and an instructional video!


Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×