Write a program to implement Binary Search in Java. In this tutorial, we are going to implement a binary search algorithm in Java. Before implementing this algorithm, let’s first understand what is binary search and how it works.
Write a java program to find the second highest number in an array. Given an unsorted array, we have to write a java code to find the second highest number in an array.
Write a Java program to find GCD of two numbers using Recursion. Given two input integers, we have to write a code to find GCD of two numbers using recursion. For this program, I assume you are familiar with the concept of recursion. If you don’t know about recursion then check my previous post on recursion vs iteration.
Write a java program to print numbers from 1 to 100 without using loop. This is a very interesting and tricky problem for beginners. You have to think how to solve this problem without using loop.
This problem can be easily solved using loop, (for and while loop). So, how do you solve this problem without using loop? The answer is using recursion.
So, In this tutorial, we are going to solve this problem using recursion.
In this article, we are going to implement bubble sort program in java. Bubble sort is a simple sorting algorithm which is used to sort an unsorted array.
We are going to cover following points in this tutorial.
i) What is Bubble Sort Algorithm?
ii) Bubble sort implementation in java (We sort an unsorted array using bubble sort algorithm).
iii) Bubble sort video tutorial.
Write a java program to find first non-repeated character in a string. Given an input string, find it’s first non-repeated character in a string.
For example –
i) Input string – java
Output – j (j is the first non-repeating character in a string)
ii) Input string – web rewrite
Output – b (b is the first non-repeating character in a string)
Write a PHP code to find second largest number in array. Given an unsorted array, we have to write a PHP program to find the second largest number in an array.
Apart from solving this problem. We have to focus on time complexity. As the time complexity of an algorithm is very important in terms of an interview.
Write a anagram program in java or Java program to check anagram. In this programming question, we are going to write a java code to check whether two strings are anagrams of each other.
Let’s first understand what is an anagram? and how we are going to solve this problem.
What is an Anagram?
Two strings are said to be anagrams of each other if it contains the same characters, only the order of characters in both the strings is different. In other words, both strings must contain the same exact letters in the same exact frequency.
Write a script to reverse a string in PHP without using strrev() method. In PHP, we can reverse a string easily using strrev() method. But think how will you reverse a string without using an inbuilt strrev() method.
Write a program to find maximum subarray sum in an array. Given an array of N elements, find the maximum possible sum of a contiguous subarray. An array can contain both positive and negative values.