Given a squared sized grid of size in which each cell has a lowercase letter. Denote the character in the the row and in the th column as G[i][j]. You can perform one operation as many times as you like: Swap two column adjacent characters in the same row G[i][j]… Read more »

Jack and Daniel are friends. They want to encrypt their conversation so that they can save themselves from interception by a detective agency. So they invent a new cipher. Every message is encoded to its binary representation B of length N. Then it is written down K times, shifted by… Read more »

You will be given a list of 32 bits unsigned integers. You are required to output the list of the unsigned integers you get by flipping bits in its binary representation (i.e. unset bits must be set, and set bits must be unset). Take 1 for example, as unsigned 32-bits… Read more »

The city of Gridland is represented as an matrix where the rows are numbered from to and the columns are numbered from to . Gridland has a network of train tracks that always run in straight horizontal lines along a row. In other words, the start and end points of… Read more »