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…Read More »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…Read More »Bubble Sort… – FcukTheCode
Huffman Coding -: Greedy Algorithms 👇 👇 🙂Link –> HUFFMAN CODING Given a money system, is it possible to give an amount of coins and…Read More »Huffman Coding : Change-making problem ..:- fcukthecode
Huffman Coding -: Greedy Algorithms 👇 👇 🙂Link –> HUFFMAN CODING The ProblemYou have a set of things to do (activities). Each activity has a…Read More »Huffman Coding – Activity Selection Problem
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…Read More »Calculating the price of cake on the Yth day…[Cprogm] fcukthecode.com
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…Read More »Number of possible non-increasing arrays…[Cprogm]FcukTheCode
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…Read More »Create a programming logic to display the type of spinach using the calorie value…[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…Read More »Find no of strings she can make using each of the alphabet as starting character…[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…Read More »Create a programming snippet to find the Pythagorean triplet…[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…Read More »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
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…Read More »Sort the array in non-decreasing order and print out the original indices…[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…Read More »Now the lifeless, want to know the number of landmasses on the planet after all the meteorites have fallen…[Cprogm]FTC
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…Read More »Complete the error page module?…[Cprogm] FcukTheCode
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. …Read More »Find the minimum distance between any pair of equal elements in the array…[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…Read More »Print an integer representing the number of matching pairs of socks that are available…[Cprogm]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…Read More »Sundar is well known for setting typical problems for the contest…[Cprgm]FTC
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…Read More »Given the heights of all the boys and girls tell whether…..[Cprogm] FcukTheCode
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…Read More »Choosing a sequence of cities to visit which maximizes happiness…[Cprogm]FTC
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…Read More »Number of unique patches of rectangular land that he can grow….[Cprogm]
Nathan has given a square map to Nancy as a matrix of integer strings. Each cell of the map has a value denoting its depth.…Read More »Find all the cavities on the map and replace their depths…[Cprogm]FTC
A Zoo consists of a lion museum and a zoo for safari riding. There are many passengers and n single-passenger cars. Passengers wander around the…Read More »Find the status of the passengers and safari cars after k units of time…[Cprogm]FTC
A play school has a number of children and a number of treats to pass out to them. Their teacher decides the fairest way to…Read More »Determine the chair number occupied by the child who will receive that chocolate!!….[Cprogm]FTC
Can you please tell whether Pathan will be able to build such a Rubik’s cube or not? Pathan likes solving Rubik’s cube a lot. He…Read More »The newly created cube can be of any dimension. For achieving that, he can disassemble and reassemble…[Cprogm]FTC
Mithran has an array of lengths n. He has just enough free time to make a new array consisting of n copies of the old…Read More »Length of the new array’s longest increasing sub-sequence…[Cprgm]FTC
One day Anna got the following task at school: to arrange several numbers in a circle so that any two neighboring numbers differs exactly by…Read More »Anna: could she have hypothetically completed the task using all those given numbers?….[Cprogm]FTC
B.Tech students going to make their own higher studies application! The application must perform two types of operations: add a name, where name is a string…Read More »Given n sequential add and find operations, perform each operation in order….[Cprgm]FTC
Polycarp has an array consisting of n integers. He wants to play a game with this array. The game consists of several moves. On the…Read More »Polycarp’s goal is to minimize the sum of non-deleted elements of array after the end of the game….[Cprogm]FTC
Tina had a pretty weird sleeping schedule. There are h hours in a day. Tina will sleep exactly n times. The i -th time he…Read More »The maximum number of good sleeping times….[Cprogm]FTC
Ramesh have been given an array A of size N and an integer K. This array consists of N integers ranging from 1 to 10^7.…Read More »Each element in this array is said to have a Special Weight…[Cprogm]FTC
Monkey B., the young coach of Ninjas, has found the big house which consists of n flats ordered in a row from left to right.…Read More »Determine the minimum number of flats he has to visit….[Cprogm]FTC
Vijay has given a set of points 𝑥1, 𝑥2, …, 𝑥𝑛 on the number line. Two points 𝑖 and 𝑗 can be matched with each…Read More »Maximum number of pairs of points you can match with each other…[Cprogm]FTC