Category: Java

String – Repeating Alphabets

                    String - Repeating Alphabets   Given a string S as the input, print the distinct alphabets in S that occur more than once. The alphabets must be printed based on the order of their occurrence in S. Input Format: The first line contains S. Output

Pattern – ZigZag Number Square

                 Pattern - ZigZag Number Square   Given an integer N as the input, print the pattern as given in the Example Input/Output section. Input Format: The first line contains N. Output Format: N lines containing the desired pattern. Boundary Conditions: 2 <= N <= 50 Example Input/Output

Second Largest Value among N integers

            Second largest value among n integer   The program must accept N integers and print the second largest value among the N integers. Input Format: The first line denotes the value of N. Next N lines will contain the N integer values. Output Format: The first line contains the

Day 7: Arrays

                   Day 7: Arrays Objective Today, we're learning about the Array data structure. Check out the Tutorial tab for learning materials and an instructional video! Task Given an array, , of  integers, print 's elements in reverse order as a single line of space-separated numbers. Input Format The first line contains an integer,  (the size of our

Day 6: Let’s Review

              Day 6: Let's Review Objective Today we're expanding our knowledge of Strings and combining it with what we've already learned about loops. Check out the Tutorial tab for learning materials and an instructional video! Task Given a string, , of length  that is indexed from  to , print its even-indexed and odd-indexed characters as  space-separated strings on a single

Day 5: Loops

                    Day 5: Loops Objective In this challenge, we're going to use loops to help us do some simple math. Check out the Tutorial tab to learn more. Task Given an integer, , print its first  multiples. Each multiple  (where ) should be printed on a new line in the form: n x

Day 4: Class vs. Instance

             Day 4: Class vs. Instance Objective In this challenge, we're going to learn about the difference between a class and an instance; because this is an Object Oriented concept, it's only enabled in certain languages. Check out the Tutorial tab for learning materials and an instructional video! Task Write a Person class with an instance variable, , and a

Minimum Distance Between Alphabets

                Minimum Distance Between Alphabets      Minimum Distance Between Alphabets :Given a string S and two alphabets C1 and C2 present in S, find the minimum distance D  between C1 and C2 in S. Input Format: The first line will contain S. The second line will contain

Three Strings

                                                           Three Strings     Given N string values, the program must print 3 string values as the output as described in the Example Input/Output section. Input

Day 2: Operators

                 Day 2: Operators Objective In this challenge, you'll work with arithmetic operators. Check out the Tutorial tab for learning materials and an instructional video! Task Given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip),) and tax percent (the percentage of the meal price being added as tax)