# Tag: Code

## 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 integers ‘X’ in the range such that (Greatest common divisor) GCD(X, F(X)) > 1

Ragu has given a range (L, R] to Smith. Smith wants to require to find the number of integers ‘X’ in the range such that…

## Metasploit Is Powerfull and installing on linux

Metasploit is a powerful open-source framework widely used in penetration testing, also known as pen testing. It provides a comprehensive environment for security professionals to…

## Coins and Triangle in Java …FTC

Chef belongs to a very rich family which owns many gold mines. Today, he brought N gold coins and decided to form a triangle using…

## Help Mommy out …fcukthecode

Mommy is a very active lady. She likes to keep all stuff sorted. She has developed an interesting technique of sorting stuff over the years.…

## 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…

## Sorting – fcukthecode

Parameter Description Stability A sorting algorithm is stable if it preserves the relative order of equal elements after sorting. In place A sorting algorithm is…

## Occurrences of the Given Digit in Java …fcukthecode

Calculate the number of occurrences of the given input digit in the given numbers. InputThe first line of input consists of a single integer T,…

## Occurrences of the digit 4 Java .. – FTC

Kostya likes the number 4 much. Of course! This number has such a lot of properties, like: Four is the smallest composite number; It is…

## 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…

## Binary Addition in Java …fcukthecode

Write a Java program to add two binary numbers. INPUT_1:Enter the Binary 1:Β  010Enter the Binary 2:Β  011 OUTPUT:Addition of the two binary number isΒ …

## Selection Sorting in Java …fcukthecode

Sort the given set of numbers using Selection Sort. The first line of the input contains the number of elements, The second line of the…

## Average value of array element [Java] …ftc

Write a Java Program to Calculate the average value of array element.Refer the testcases INPUT_1:Enter n number:Β  4Enter n arrays:Β  34Β  89Β  100Β  78 OUTPUT:Average…

## Huffman Coding -: Greedy Algorithms …FTC

Huffman Coding β Activity Selection Problemπ π Activity Selection Problem Huο¬man code is a particular type of optimal preο¬x code that is commonly used for…

## Metaverse – It is/will be the future …FTC

Alert: Watch the Anime βSword Art Onlineβ and the film βReady Player oneβ before reading this. Metaverse is the Future. Have anyone seen Sword Art…

## Match string with rotated string in java …ftc

Write a java Java program to check whether one string is rotation of another string. INPUT_1:String s1:  string1234String s2:  1234string OUTPUT:s2 is a rotated version…

## Maximum occurring character in Java ..ftc

Given a string, Write an efficient java method to return maximum occurring character in the input string E.g., if input string is “test” then function…

## First half of the string – Java program …ftc

Write a Java program for, Given a string of even length, return the first half. INPUT_1:Enter any String:Β  Deadpool OUTPUT:Dead INPUT_2:Enter any String:Β  fcukthecode.co OUTPUT:fcukthe…

## Magician’s Numbers in Java …fcukthecod

This problem practices the addition of 2-digit numbers. Encourage the students to share the methods that they use to solve the problem. For example some…