Remove Duplicates

Problem Write a program that removes duplicate characters and outputs when a single lowercase character string is input. Each character in the stripped string retains the order of the original string. input A string is entered on the first line. output Prints a string with duplicate characters…

Read More

Activate Fountain

Problem My Solution success

Read More

Error Digit Range

Problem My Solution success

Read More

Max Double Slice Sum

Problem A non-empty array A consisting of N integers is given. A triplet (X, Y, Z), such that 0 ≤ X < Y < Z < N, is called a double slice. The sum of double slice (X, Y, Z) is the total of AX + 1 + AX + 2 + … + AY − 1 + AY + 1 + AY + 2 + … + AZ − 1. For example, array A such that: contains the…

Read More

EquiLeader

Problem A non-empty array A consisting of N integers is given. The leader of this array is the value that occurs in more than half of the elements of A. An equi leader is an index S such that 0 ≤ S < N − 1 and two sequences A0, A1, …, AS and AS + 1, AS + 2, …, AN − 1 have leaders of the same value…

Read More
Page 17 Of 26