# Author: vishal naik

## Second largest number in an array

Problem: Find the second largest number in an array. This program is asked in entry-level interviews. In this article we will see how to find second largest number in array in …

## k largest elements / smallest elements in an array

Problem: Given an array of size n, find first k largest elements (smallest elements) in the array. This program is asked in interviews to check how efficiently you can …

## Matrix multiplication program in Java

Problem: Write a program in Java for matrix multiplication. This program is a college level program. This program is asked in entry level interviews to see if you can handle …

## Nth Fibonacci number in Java

Problem: Find nth Fibonacci number in Java. Write a Java program to find nth Fibonacci number. What is Fibonacci series? In mathematics, following is the Fibonacci series. (We will take …

## x raised to power y in Java

Problem: Find x raised to power y in Java without using in built functions. This program is asked in entry level interviews to check knowledge of algorithms. x raised …

## GCD of two numbers in Java

Problem: Find GCD of given numbers in Java. This is a college level program and asked in entry level interviews. This program is asked to check your arithmetic ability and knowledge …

## Pangram : Check if a string has all the letters of alphabet

Problem: Check if a sentence is a pangram or check if a string has all the letters of alphabet. What is a pangram? A Pangram is a sentence which contains …

## First repeating element in array in Java

Problem: First repeating element in array. Given an array of integers, find the first repeating number in the array. Example: Input array, arr = Then first repeating number …

## Prime number program in Java

Problem: Check if a given number is a prime number in Java. This is college level program and asked in entry level interviews. I have added JUnits also along …

## Longest substring without repeating characters

Problem: Find longest substring without repeating characters. This program is asked in programming interviews. Easy and elegant solution is expected. Ex: If the input string is “abcabcd” then the longest …