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
The Coin Change Problem
Cerinta completa Given an amount and the denominations of coins available, determine how many ways change can be made for amount. There is a limitless supply of each coin type. Example There are ways to make change for : ,
Turn Off the Lights
Cerinta completa There are bulbs in a straight line, numbered from to . Each bulb has a button associated with it, and there is a cost, , for pressing this button. When some button is pressed, all the bulbs at
Task Scheduling
Cerinta completa You have a long list of tasks that you need to do today. To accomplish task you need minutes, and the deadline for this task is . You need not complete a task at a stretch. You can
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
Superman Celebrates Diwali
Cerinta completa Superman has been invited to India to celebrate Diwali. Unfortunately, on his arrival he learns that he has been invited mainly to help rescue people from a fire accident that has happened in a posh residential locale of
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
