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

Author: Pasindu Piumal

  • IOI

IOI 2019 – Broken Line Problem and Solution

imageByPasindu PiumalAugust 15, 2020
IOI 2019 – Broken Line Problem and Solution
The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Broken Line Problem and Solution below. Problem : Solution : Explanation :

Read More

  • IOI

IOI 2019 – Rectangles Problem and Solution

imageByPasindu PiumalAugust 15, 2020
IOI 2019 – Rectangles Problem and Solution
The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Rectangles Problem and Solution below. Problem : Solution : Explanation :  155 total views

Read More

  • IOI

IOI 2019 – Split the Attractions Problem and Solution

imageByPasindu PiumalAugust 15, 2020
IOI 2019 – Split the Attractions Problem and Solution
The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Split the Attractions Problem and Solution below. Problem : Solution : Explanation :

Read More

  • IOI

IOI 2019 – Arranging Shoes Problem and Solution

imageByPasindu PiumalAugust 15, 2020
IOI 2019 – Arranging Shoes Problem and Solution
The 31st International Olympiad in Informatics was held in Baku, Azerbaijan in 2019. There were two competition days, with 3 tasks given to the competitors on each day. You can see Arranging Shoes Problem and Solution below. Problem : Solution : Explanation :

Read More

  • Java

Java Loops I – HackerRank Solution

imageByPasindu PiumalAugust 15, 2020
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 PiumalAugust 14, 2020
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 PiumalAugust 14, 2020
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 PiumalAugust 14, 2020
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 PiumalAugust 14, 2020
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 PiumalAugust 14, 2020
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 PiumalAugust 14, 2020
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 PiumalAugust 14, 2020
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

  • Pyhton

Write a function – HackerRank Solution

imageByPasindu PiumalAugust 14, 2020
Write a function – HackerRank Solution
Problem : An extra day is added to the calendar almost every four years as February 29, and the day is called a leap day. It corrects the calendar for the fact that our planet takes approximately 365.25 days to orbit the sun. A leap year contains a leap day. In the

Read More

  • Pyhton

Loops – HackerRank Solution

imageByPasindu PiumalAugust 14, 2020
Loops – HackerRank Solution
Problem : Task : The provided code stub reads and integer, n, from STDIN. For all non-negative integers i < n, print i2. Example : n = 3 The list of non-negative integers that are less than n = 3 is [0, 1, 2]. Print the square of each number on a separate line. Input

Read More

  • C++

Maps-STL – HackerRank Solution

imageByPasindu PiumalAugust 14, 2020
Maps-STL – HackerRank Solution
Problem : Maps are a part of the C++ STL.Maps are associative containers that store elements formed by a combination of a key value and a mapped value, following a specific order.The mainly used member functions of maps are: Map Template : Declaration : Size : Insert :

Read More

  • C++

Sets-STL – HackerRank Solution

imageByPasindu PiumalAugust 14, 2020
Sets-STL – HackerRank Solution
Problem : Sets are a part of the C++ STL. Sets are containers that store unique elements following a specific order. Here are some of the frequently used member functions of sets: Declaration : Size : Insert : Erasing an element : Finding an element : To know more about

Read More

  • C++

Lower Bound-STL – HackerRank

imageByPasindu PiumalAugust 14, 2020
Lower Bound-STL – HackerRank
You are given N integers in sorted order. Also, you are given Q queries. In each query, you will be given an integer and you have to tell whether that integer is present in the array. If so, you have to tell at which index it is present and if it is not

Read More

  • C++

Vector-Erase – HackerRank Solution

imageByPasindu PiumalAugust 14, 2020
Vector-Erase – HackerRank Solution
You are provided with a vector of N integers. Then, you are given 2 queries. For the first query, you are provided with 1 integer, which denotes a position in the vector. The value at this position in the vector needs to be erased. The next

Read More

  • C++

Vector-Sort – HackerRank Solution

imageByPasindu PiumalAugust 14, 2020
Vector-Sort – HackerRank Solution
Problem : You are given N integers.Sort the N integers and print the sorted order.Store the N integers in a vector.Vectors are sequence containers representing arrays that can change in size. Declaration : Size : Pushing an integer into a vector

Read More

  • C++

Virtual Functions – HackerRank Solution

imageByPasindu PiumalAugust 14, 2020
Virtual Functions – HackerRank Solution
This problem is to get you familiar with virtual functions. Create three classes Person, Professor and Student. The class Person should have data members name and age. The classes Professor and Student should inherit from the

Read More

Posts navigation

PreviousPrevious page Page 1 Page 2 Page 3 … Page 5 NextNext page

Last Posts

IOI 2020

IOI 2020 – Contest Day 1- Tickets Problem and Solution

September 24, 2020
IOI 2020

IOI 2020 – Contest Day 1- Supertrees Problem and Solution

September 24, 2020
IOI 2020

IOI 2020 – Contest Day 1- Plants Problem and Solution

September 24, 2020

Day of the Programmer – HackerRank Solution

September 11, 2020

APIO 2020 Problems and Solutions – Fun Tour

September 5, 2020

Archives

  • 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