Category: Java

Only Alphabets and Space

                                             Only Alphabets and Space      Given a String S, remove all the special characters and numbers from S and print. Input Format: The first line contains the string S Output Format: The

Sort Pass Students by Name

                                  Sort Pass Students by Name   A list of N students name and also their marks in three subjects are passed as the input. The average of the 3 subjects must be greater than or equal to 40

Print Largest Even Number – Digits

                 Print Largest Even Number - Digits [C, C++, JAVA] Given a number N as the input, print the largest even number E that can be formed using the digits present in the number. (There will be at least one even digit). Input Format: The first line contains

Skipping Subpath Sum

           Skipping Subpath Sum There is a tree  with  vertices numbered from  to . In addition,  is the value assigned to the -th vertex. Consider any path  in the tree. We define a skipping sum of this path to be the maximum of the two below values:  where  is the maximum odd integer not greater than .  where  is the maximum even

Keywords

                     Keywords Given a paragraph of space-separated lowercase English words and a list of unique lowercase English keywords, find the minimum length of the substring of which contains all the keywords that are separated by space in any order. Note: The keywords should be space separated words but

Collatz Sequence Sum

             Collatz Sequence Sum   The following iterative sequence is defined for the set of positive integers:                                                       If at some point the value

Castle Towers

                  Castle Towers Eragon is a dragon that is visiting the town of Osaka. There are n towers of various heights in the city, and tower i has height of height i. Because the taller towers tower over the shorter ones, Eragon can only blow out the

Fraudulent Activity Notifications

             Fraudulent Activity Notifications Hacker Land National Bank has a simple policy for warning clients about possible fraudulent account activity. If the amount spent by a client on a particular day is greater than or equal to 2X the client's median spending for the last d days, they send the client a notification about

Perfect Squares – Till N

                    Perfect Square till N Java, Cpp   Given a positive integer N as the input, print all the perfect squares till N (inclusive of N). Input Format: The first line contains N. Output Format: The first line contains the perfect squares till N separated by

Pattern Printing – Start Number

                 Pattern Printing - Start Number   Given an integer N as the input and a start integer S, print the pattern as given in the Example Input/Output section. Input Format: The first line contains S and N, each separated by a space. Output Format: 2N lines containing