Tips & Tricks

Pyramid Traversal Solution | DEC LONG CHALLENGE | Codechef

You are given a pyramid of the following form with an infinite number of rows:112 32 34 5 64 5 67 8 9 107 8 9 10…………………. From a cell, you can move to either the bottom-left cell or the bottom-right cell directly in contact with the current one (For example, you can make the following moves: 1→2,1→3,6→9,6→101→2,1→3,6→9,6→10, while you cannot make moves 2→62→6 or 2→72→7). You are given a starting cell ss and an …

Pyramid Traversal Solution | DEC LONG CHALLENGE | Codechef Read More »

Increasing String Solution | DEC LONG CHALLENGE | Codechef

You are given a string SS, consisting of lowercase English letters. You can do the following operation at most once : Choose a subsequence of the string SS, then remove it from SS and concatenate the subsequence at the end of the remaining string. Find the lexicographically minimum string that can be obtained by performing this operation at most once on SS. Note that: A string AA is …

Increasing String Solution | DEC LONG CHALLENGE | Codechef Read More »

Squares Counting Solution | DEC LONG CHALLENGE | Codechef

You are given a binary square matrix AA of size N×NN×N. Let the value at cell (i,j)(i,j) be denoted by A(i,j)A(i,j). Your task is to count the number of square frames present in the grid. A square frame is defined to be a square submatrix of AA whose border elements are all ‘1’. Formally, A square submatrix of AA of size kk with top-left corner (i,j)(i,j) is defined to be the set of …

Squares Counting Solution | DEC LONG CHALLENGE | Codechef Read More »

Rock Paper Scissors Solution | DEC LONG CHALLENGE | Codechef

There are NN players standing in a line, indexed 11 to NN from left to right. They all play a game of Rock, Paper, Scissors. Each player has already decided which move they want to play. You are given this information as a string SS of length NN, i.e, SiSi is equal to RR if player ii will play Rock. SiSi is equal to PP if player ii will play Paper. SiSi is equal to SS if …

Rock Paper Scissors Solution | DEC LONG CHALLENGE | Codechef Read More »

Check Mate Solution | DEC LONG CHALLENGE | Codechef

You are given a standard 8×88×8 chessboard which has exactly 33 pieces placed on it – 22 black rooks and 11 white king. The rows are numbered 11 to 88 from bottom to top, and the columns are numbered 11 to 88 from left to right. The cell at the intersection of the ii-th column and jj-th row is denoted (i,j)(i,j) (like the coordinate system on the xyxy-plane). Is it possible for the white king to …

Check Mate Solution | DEC LONG CHALLENGE | Codechef Read More »

Valleys and Hills Solution | DEC LONG CHALLENGE | Codechef

Chef built a binary string SS that has exactly NN hills and MM valleys. A hill is any index 1<i<|S|1<i<|S| such that both its neighbors are strictly smaller than it, i.e, Si−1<SiSi−1<Si and Si+1<SiSi+1<Si. A valley is any index 1<i<|S|1<i<|S| such that both its neighbors are strictly larger than it, i.e, Si−1>SiSi−1>Si and Si+1>SiSi+1>Si. Chef thinks that his string SS is the shortest among all binary strings with NN hills and MM valleys. You don’t quite trust his words, so to …

Valleys and Hills Solution | DEC LONG CHALLENGE | Codechef Read More »

List of Lists Solution | DEC LONG CHALLENGE | CodeChef

You are given a positive integer NN and an array AA of size NN. There are NN lists L1,L2…LNL1,L2…LN. Initially, Li=[Ai]Li=[Ai]. You can perform the following operation any number of times as long as there are at least 22 lists: Select 22 (non-empty) lists LiLi and LjLj (i≠ji≠j) Append LjLj to LiLi and remove the list LjLj. Note that this means LjLj cannot be chosen in any future operation. Find the minimum number of operations required to obtain a …

List of Lists Solution | DEC LONG CHALLENGE | CodeChef Read More »

cognizant

Cognizant Hiring | Graduate Trainee | APPLY NOW

Job Description • Responsible for providing IT Infrastructure support covering cloud and on premise products like Windows, Azure, MS Office and other business applications to our global customers• Collaborate with 5.6+ Million Users globally to ensure seamless functioning of business• Work in partnership with various business domains like Banking, Finance, Insurance, Communications, Media, Retail, HealthCare, …

Cognizant Hiring | Graduate Trainee | APPLY NOW Read More »

deloitte

Deloitte Hiring | QA- Senior Analyst | APPLY NOW

Position Summary ServiceNow Quality Engineer – Analyst Analyzing Requirements, preparing test data and Executing & Analyzing business processes with respect to quality using various Test and Defect Management tools and related suite of products. Work you’ll do As a Quality Analyst you will be working closely with Development team, Technical Delivery Mangers, Product Owners and …

Deloitte Hiring | QA- Senior Analyst | APPLY NOW Read More »

x