One day Anna got the following task at school: to arrange several numbers in a circle so that any two neighboring numbers differs exactly by…
B.Tech students going to make their own higher studies application! The application must perform two types of operations: add a name, where name is a string…
Polycarp has an array consisting of n integers. He wants to play a game with this array. The game consists of several moves. On the…
Tina had a pretty weird sleeping schedule. There are h hours in a day. Tina will sleep exactly n times. The i -th time he…
Ramesh have been given an array A of size N and an integer K. This array consists of N integers ranging from 1 to 10^7.…
Monkey B., the young coach of Ninjas, has found the big house which consists of n flats ordered in a row from left to right.…
Given a square matrix of order n*n, we need to print elements of the matrix in Z form.Square matrix means “A matrix having same or…
Given a square matrix and a number k. The task is to shift the first k elements of each row to the right of the…
You are a coach at your local university. There are n students under your supervision, the programming skill of the i-th student is ai. You…
Vijay has given a set of points 𝑥1, 𝑥2, …, 𝑥𝑛 on the number line. Two points 𝑖 and 𝑗 can be matched with each…
Eugene likes working with arrays. And today he needs your help in solving one challenging task. An array c is a sub-array of an array…
There is a binary string a of length n . In one operation, you can select any prefix of a with an equal number of…
A video player plays a game in which the character competes in a hurdle race. Hurdles are of varying heights, and the characters have a…
Arif and Caleb both are friends. Both are planning to utilize the vacation holidays by learning a programming language. They learned the concept of the pointer…
Given an m x n matrix, return all elements of the matrix in spiral order. INPUT_1:1 2 3 4 516 17 18 19 615 24 …
Given a matrix containing lower alphabetical characters only, we need to print all palindromic paths in given matrix. A path is defined as a sequence…
Yasir was traveling from Chennai to Bangalore by bus. He looking the LED display board for the destination place name on the bus. But it…
Kalpana Chawla is planning an expedition to Jupiter for 𝑛 people. One of the important tasks is to provide biscuits for each participant. The warehouse…
Mukesh has given an array 𝑎1,𝑎2,…,𝑎𝑛 to Mahesh. Mahesh can remove at most one subsegment from it. The remaining elements should be pairwise distinct. In…
Apart from having lots of vacations throughout the year, residents of India also have whole fortune years. The year is considered a fortune if it…