Program to Move zeros to end of integer array in java (example)
Given an array containing integers (+ve, -ve & 0), we would like to move zeros to end of array. We […]
Given an array containing integers (+ve, -ve & 0), we would like to move zeros to end of array. We […]
Given an array of user defined objects/POJO in java. We would like to sort user defined objects on certain properties/data
Given an array of integers in java. Print second smallest element in an array (in single iteration). We have already discussed
Given an array of integers in java. Create two stacks using single array. We shall able to perform push &
Given an array of integers in java. Print second largest element in an array (in single iteration). Example – find second largest
Create stack in java using linked list. We will implement stack using java generics. We will create a stack class,
Create or implement stack in java using array as underlying data structure. We will create stack class having following methods
Given two arrays, one array is almost duplicate array of another array. Arrays are duplicated except one element. e.g. array1[] =
Given an array containing positive & negative integers. We would like to find subarray having maximum sum. We will use
Given an integer array in java. Reverse input array using iterative & recursive algorithm. Example to reverse an integer array
A prime number is a natural number greater than 1 that has no positive divisors other than 1 & itself. e.g.Number 7
Given two sorted integer arrays containing unique or distinct elements. We would like to find out the union of two
Given two sorted arrays containing distinct elements. We would like to find out the intersection of two sorted arrays. Intersection
Given an array of integers in java. Replace every element of array with greatest number on its right. The right
Given an integer array in java, find out the leader elements in an array. What is leader element in an
Given an integer array in java, find the majority (element exist more than half element) element in an array using Boyer Moore’s voting algorithm.
Given an array containing n-1 distinct positive numbers range from 1 to n. e.g suppose n = 5, array will contain 4 unique
Given an array of integer containing positive numbers. All number in an array is occurring even number of times except one
What is insertion sort algorithm? Insertion sort is a sorting technique. The elements are inserted at an appropriate place in an
What is selection sort algorithm? Selection sort is sorting technique used to sort the elements in list data structure like array.
Given an unsorted array in java. Sort the given input array using bubble sort algorithm. Bubble sort is a sorting
Given an array containing even and odd number in java. We would like to classify the even and odd numbers.
Given an integer array containing 0 and 1. We would like to sort input array. Zeros will be left end
Problem Statement: Given an array of integer, we would like to find out, whether array contains any duplicate elements. The
Initialize One, Two & Three dimensional array in java. Create & print or loop/iterate static & dynamic multi-dimensional array in java (example).
Given an array of integers , find out maximum & minimum number in array using linear search. e.g. input array is { 50,
Given sorted integer array in java. Find or search element/integer in an array using binary search algorithm (with example). Binary
Binary search is a divide and conquer algorithm. Divide and conquer algorithm is process of dividing the input data-set after
Given the strings of array containing nulls and empty string. We will be using Java 8 streams to filter out null and empty string in strings of array. Let us take a complete example to filter out null and empty string