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.
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…
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…
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:
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:
L
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.
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.
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…
You have a string,s, of lowercase English alphabetic letters. You can perform two types of operations on s:
Leonardo thinks 4 and 7 are lucky digits! He defines a number as lucky if it can be represented as the sum of one or more of these lucky digits. For example, he considers the following numbers to be…