C++

SKFA Problem

SKFA Problem

Unless one is wealthy there is no use in being a charming fellow. Romance is the privilege of the rich, not the profession of the unemployed. These are the great truths of modern life which Hughie Erskine never realised. Poor…

Unique Colors Problem

Unique Colors Problem

Problem Statement There are N boxes with each box i has value V[i]. These boxes are colorless initially and you are supposed to paint each box with some color. But as always, there are a few conditions which you will…

[Solved] Diagonal Intercoms with C++

[Solved] Diagonal Intercoms with C++

Diagonal Intercoms: Mayflower Manor was a neatly gridded apartment which consists of 1000 by 1000 houses. The inmates of the flat requested the Apartment Association Members to connect the flat using intercom systems to communicate messages during any emergency situations…

[Solved] Pairing the brackets Contest Problem

[Solved] Pairing the brackets Contest Problem

We are given bracket sequence(may not be balanced). Every character of the sequence is either ‘(‘ or ‘)’.  For each closing bracket, we need to find an opening bracket which is farthest from it (and on left of it) and pair those two brackets.Once…