# Category: C

## Find if n can be expressed as the sum of two desperate numbers

Sakthi has been acting strangely for a few days now. Finally, you (his best friend) found out that it was because his project proposal was…

## Find the number of silver rectangles [FTC]

Suresh have “N” rectangles. A rectangle is Silver if the ratio of its sides is in between [1.6, 1.7], both inclusive. Your task is to…

## Bubble Sort… – FcukTheCode

Parameter Description Stable Yes In place Yes Best case complexity O(n) Average case complexity O(n^2) Worst case complexity O(1) The BubbleSort compares each successive pair…

## Huffman Coding : Change-making problem ..:- fcukthecode

Huffman Coding -: Greedy Algorithms ๐ ๐ ๐Link –> HUFFMAN CODING Given a money system, is it possible to give an amount of coins and…

## Huffman Coding – Activity Selection Problem

Huffman Coding -: Greedy Algorithms ๐ ๐ ๐Link –> HUFFMAN CODING The ProblemYou have a set of things to do (activities). Each activity has a…

## Calculating the price of cake on the Yth day…[Cprogm] fcukthecode.com

Fahad’s Birthday is a week ahead. Arav and his friends are planning to give him a birthday party. For that Arav’s friends want him to…

## Number of possible non-increasing arrays…[Cprogm]FcukTheCode

Arov was given a problem to solve, by his brother Dharma.ย  The problem was like, given integers, N and K, Arov has to find the…

## Create a programming logic to display the type of spinach using the calorie value…[Cprogm]FTC

Aru runs a small hotel near the popular university. The hotel also runs very well due to the high taste. All the menus in the…

## Find no of strings she can make using each of the alphabet as starting character…[Cprogm]FTC

Tina has recently been introduced to a programming concept called Hashing.Hashing is the transformation of a string of characters into a usually shorter fixed-length value…

## Create a programming snippet to find the Pythagorean triplet…[Cprogm] FTC

Fazil the tutor of the skill training institute gave ย an array of integers to one of highly attentive student of his class Rohan and asked…

## To estimate how many of his dishes he will be able to cook, find out what’s the minimum possible energy he needs to spend…[Cprogm]FTC

Oh, no! Shahid in trouble. Heโs got himself stuck in a cave (we donโt know how) and is looking for a way out.The bigger problem…

## Sort the array in non-decreasing order and print out the original indices…[Cprogm]FTC

Amrish is a brilliant student who has a huge interest in coding. So his friend Dev gave an arrayย Aย of non-negative integers of sizeย mย to Amrish and…

## Now the lifeless, want to know the number of landmasses on the planet after all the meteorites have fallen…[Cprogm]FTC

Once upon a time, the Earth was a flat rectangular landmass. And there was no life. It was then that the sky lit up with…

## Complete the error page module?…[Cprogm] FcukTheCode

Ana is involved in developing a new web browser After many sleepless nights she finishes most of the modules of her new web browser and…

## Find the minimum distance between any pair of equal elements in the array…[Cprogm]FTC

Ray who studies arts came across a programming challenge of finding the distance between the two array values is the number of indices between them.ย …

## Print an integer representing the number of matching pairs of socks that are available…[Cprogm]FTC

Shah is an road side cloth seller. There is a large pile of socks that must be paired by color for sale.  Given an array…

## Sundar is well known for setting typical problems for the contest…[Cprgm]FTC

Sundar is well known for setting typical problems for the contest.ย  During contest at a particular time, many teams were not able to solve single…

## Given the heights of all the boys and girls tell whether…..[Cprogm] FcukTheCode

There are M boys and N girls in the gang.ย  Each boy can only dance with a girl who is strictly shorter than him.ย A girl…

## Choosing a sequence of cities to visit which maximizes happiness…[Cprogm]FTC

One fine day when Sozy returned to her hometown she met Mega and had a crush on her. After a weeks time Mega went to…

## Number of unique patches of rectangular land that he can grow….[Cprogm]

Samba can be grown in rectangular patches of any side lengths. However, The owner only has a limited amount of land. Consider the entire town…