Team Formation

Cerinta completa For an upcoming programming contest, Roy is forming some teams from the students of his university. A team can have any number of contestants. Roy knows the skill level of each contestant. To make the teams work as

Zig Zag Sequence

Cerinta completa In this challenge, the task is to debug the existing code to successfully execute all provided test files. Given an array of distinct integers, transform the array into a zig zag sequence by permuting the array elements. A

Two Strings Game

Cerinta completa Consider the following game for two players: There are two strings A and B. Initially, some strings A’ and B’ are written on the sheet of paper. A’ is always a substring of A and B’ is always

XOR Matrix

Cerinta completa Consider a zero-indexed matrix with rows and columns, where each row is filled gradually. Given the first row of the matrix, you can generate the elements in the subsequent rows using the following formula: Each row is generated

Tree Flow

Cerinta completa Recall that a tree is an undirected, connected acyclic graph. We have a weighted tree, , with vertices; let be the total sum of edge weights on the path between nodes and . Let’s consider all the matrices,

Viral Advertising

Cerinta completa HackerLand Enterprise is adopting a new viral advertising strategy. When they launch a new product, they advertise it to exactly people on social media. On the first day, half of those people (i.e., ) like the advertisement and