Skip to content

SL TECH ACADEMY

Contact us
  • Home
  • C++
  • Pyhton
  • Java
  • Networking
  • Problem Solving
    • Algorithms
    • Data Structures
  • Contests
    • IOI
    • APIO
    • Google
      • Code Jam
      • Hash Code
      • Kick Start
  • Resources

SL TECH ACADEMY

Tag: HackerRank

  • Algorithms

Day of the Programmer – HackerRank Solution

imageByPasindu Piumal2020-09-11
Day of the Programmer – HackerRank Solution
Problem : Marie invented a Time Machine and wants to test it by time-traveling to visit Russia on the Day of the Programmer (the 256th day of the year) during a year in the inclusive range from 1700 to 2700. From 1700 to 1917, Russia’s official calendar was the Julian

Read More

  • Algorithms

Migratory Birds – HackerRank Solution

imageByPasindu Piumal2020-09-03
Migratory Birds – HackerRank Solution
Problem : You have been asked to help study the population of birds migrating across the continent. Each type of bird you are interested in will be identified by an integer value. Each time a particular kind of bird is spotted, its id number will be added to your array of

Read More

  • Algorithms

Divisible Sum Pairs – HackerRank Solution

imageByPasindu Piumal2020-09-03
Divisible Sum Pairs – HackerRank Solution
Problem : You are given an array of n integers, ar = [ar[0], ar[1], ..., ar[n-1]], and a positive integer, k. Find and print the number of (i, j) pairs where i < j and ar[i] + ar[j] is divisible by k. For example, ar = [1, 2, 3, 4, 5, 6] and k = 5. Our three pairs meeting

Read More

  • Algorithms

Birthday Chocolate – HackerRank Solution

imageByPasindu Piumal2020-09-01
Birthday Chocolate – HackerRank Solution
Problem : Lily has a chocolate bar that she wants to share it with Ron for his birthday. Each of the squares has an integer on it. She decides to share a contiguous segment of the bar selected such that the length of the segment matches Ron’s birth month and the sum of

Read More

  • Algorithms

Breaking the Records – HackerRank Solutions

imageByPasindu Piumal2020-08-31
Breaking the Records – HackerRank Solutions
Problem : Maria plays college basketball and wants to go pro. Each season she maintains a record of her play. She tabulates the number of times she breaks her season record for most points and least points in a game. Points scored in the first game

Read More

  • Algorithms

Between Two Sets – HackerRank Solution

imageByPasindu Piumal2020-08-25
Between Two Sets – HackerRank Solution
Problem : You will be given two arrays of integers and asked to determine all integers that satisfy the following two conditions: The elements of the first array are all factors of the integer being considered The integer being considered is a factor of all elements of the

Read More

  • Algorithms

Kangaroo – HackerRank Solution

imageByPasindu Piumal2020-08-21
Kangaroo – HackerRank Solution
Problem : You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at location x1 and moves at a rate of v1 meters

Read More

  • Algorithms

Apple and Orange – HackerRank Solution

imageByPasindu Piumal2020-08-21
Apple and Orange – HackerRank Solution
Problem : Sam’s house has an apple tree and an orange tree that yield an abundance of fruit. In the diagram below, the red region denotes his house, where s is the start point, and t is the endpoint. The apple tree is to the left of his house, and the orange tree is to

Read More

  • Algorithms

Grading Students – HackerRank Solution

imageByPasindu Piumal2020-08-21
Grading Students – HackerRank Solution
Problem : HackerLand University has the following grading policy: Every student receives a grade in the inclusive range from 1 to 100. Any grade less than 40 is a failing grade. Sam is a professor at the university and likes to round each student’s grade according to

Read More

  • Algorithms

Time Conversion – HackerRank Solution

imageByPasindu Piumal2020-08-21
Time Conversion – HackerRank Solution
Problem : Given a time in 12-hour AM/PM format, convert it to military (24-hour) time. Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock. Function Description : Complete

Read More

  • Algorithms

Birthday Cake Candles – HackerRank Solution

imageByPasindu Piumal2020-08-20
Birthday Cake Candles – HackerRank Solution
Problem : You are in charge of the cake for your niece’s birthday and have decided the cake will have one candle for each year of her total age. When she blows out the candles, she’ll only be able to blow out the tallest ones. Your task is to find out how many candles

Read More

  • C++

Print Pretty – HackerRank Solution

imageByPasindu Piumal2020-08-18
Print Pretty – HackerRank Solution
Problem : Your manager gave you a text file with many lines of numbers to format and print. For each row of 3 space-separated doubles, format and print the numbers using the specifications in the Output Format section below. Input Format : The first line

Read More

  • Java

Java Loops I – HackerRank Solution

imageByPasindu Piumal2020-08-15
Java Loops I – HackerRank Solution
Problem : Objective : In this challenge, we’re going to use loops to help us do some simple math. Task : Given an integer, N, print its first 10 multiples. Each multiple N * i (where 1 <= i <= 10) should be printed on a new line in the form: N x i = result. Input

Read More

  • Java

Java Output Formatting – HackerRank Solution

imageByPasindu Piumal2020-08-14
Java Output Formatting – HackerRank Solution
Problem : Java’s System.out.printf function can be used to print formatted output. The purpose of this exercise is to test your understanding of formatting output using printf. To get you started, a portion of the solution is provided for you in the

Read More

  • Java

Java Stdin and Stdout II – HackerRank Solution

imageByPasindu Piumal2020-08-14
Java Stdin and Stdout II – HackerRank Solution
Problem : In this challenge, you must read an integer, a double, and a String from stdin, then print the values according to the instructions in the Output Format section below. To make the problem a little easier, a portion of the code is

Read More

  • Java

Java If-Else – HackerRank Solution

imageByPasindu Piumal2020-08-14
Java If-Else – HackerRank Solution
Problem : In this challenge, we test your knowledge of using if-else conditional statements to automate decision-making processes. An if-else statement has the following logical flow: Source: Wikipedia Task : Given an integer, n, perform the following conditional actions:

Read More

  • Java

Java Stdin and Stdout I – HackerRank solution

imageByPasindu Piumal2020-08-14
Java Stdin and Stdout I – HackerRank solution
Problem : Most HackerRank challenges require you to read input from stdin (standard input) and write output to stdout (standard output). One popular way to read input from stdin is by using the Scanner class and specifying the Input

Read More

  • Java

Welcome to Java! – HackerRank Solution

imageByPasindu Piumal2020-08-14
Welcome to Java! – HackerRank Solution
Problem : Welcome to the world of Java! In this challenge, we practice printing to stdout. The code stubs in your editor declare a Solution class and a main method. Complete the main method by copying the two lines of code below and pasting them

Read More

  • Pyhton

List Comprehensions – HackerRank Solution

imageByPasindu Piumal2020-08-14
List Comprehensions – HackerRank Solution
Problem : Let’s learn about list comprehensions! You are given three integers x, y and z representing the dimensions of a cuboid along with an integer n. Print a list of all possible coordinates given by (i,j,k) on a 3D grid where the sum of i + j + k is not equal

Read More

  • Pyhton

Print Function – HackerRank Solution

imageByPasindu Piumal2020-08-14
Print Function – HackerRank Solution
Problem : The included code stub will read an integer, n, from STDIN. Without using any string methods, try to print the following: 123...n Note that “...” represents the consecutive values in between. Example : n = 5 Print the string 12345. Input Format : The

Read More

Posts navigation

Page 1 Page 2 Page 3 NextNext page

Last Posts

Chef and Meetings – Codechef Solution – February Challenge 2021 Division 3

2021-02-08

Codeforces Round 697 – Ball in Berland Solution

2021-01-27

Codeforces Round 697 – New Year’s Number Solution

2021-01-27

Codeforces Round 697 – Odd Divisor Solution

2021-01-27
IOI 2020

IOI 2020 – Contest Day 1- Tickets Problem and Solution

2020-09-24

Archives

  • February 2021 (1)
  • January 2021 (3)
  • September 2020 (10)
  • August 2020 (68)
  • July 2020 (18)
Created by SL TECH ACADEMY. Powered by WordPress
Logo
  • Home
  • C++
  • Pyhton
  • Java
  • Networking
  • Problem Solving
    • Algorithms
    • Data Structures
  • Contests
    • IOI
    • APIO
    • Google
      • Code Jam
      • Hash Code
      • Kick Start
  • Resources