Tagged in

Hackerrank Solution

Codebrace
Codebrace
Coding blog to help people get going with Competetive programming, Big Data and other technologies, visit http://medium.com/codebrace
More information
Followers
187
Elsewhere
More, on Medium

A Circle and a Square

Problem Link: A Circle and a Square

In this challenge, you must implement part of a raster graphics editor that takes the coordinates of a circle and a square as input and draws them as filled-in shapes on a rectangular canvas.


Big Sorting

Problem Link: Big Sorting

Consider an array of numeric strings, unsorted, where each string is a positive number with anywhere from 1 to 106 digits. Sort the array’s elements in non-decreasing (i.e., ascending) order of their real-world integer values and print each element of the…


Day of the Programmer

Day of the Programmer

Problem Link: Day of the Programmer

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…


Separate the Numbers

Separate the Numbers

Problem Link: Separate the Numbers

A numeric string, s, is beautiful if it can be split into a sequence of two or more positive integers, a1,a2,….. ,an, satisfying the following conditions:


KnightL on a Chessboard

Problem Link: KnightL on a Chessboard

KnightL is a chess piece that moves in an L shape. We define the possible moves of KnightL(a,b) as any movement from some position (x1,y1) to some (x2,y2) to some satisfying either of the following:


Minimum Absolute Difference in an Array

Problem Link: Minimum Absolute Difference in an Array

Consider an array of integers, A=a0,a1,……..an-1. We define the absolute difference between two elements, ai and aj ,where(i != j) to be the absolute value ai — aj.


Migratory Birds

Problem Link: Migratory Birds

A flock of n birds is flying across the continent. Each bird has a type, and the different types are designated by the ID numbers 1, 2, 3, 4, and 5.


Organizing Containers of Balls

Problem Link: Organizing Containers of Balls

David has n containers and n different types of balls, both of which are numbered from 0 to n-1. The distribution of ball types per container are described by an n x n matrix of integers, M, where each…