## Creating a war file using Ant Script in Java

In this post, we will see simple and efficient ant build file for creating a war file in web applications in Java.

## Google Guava’s Multiset Interface in Java

A Multiset is a collection that is similar to Set, but it may have duplicate elements. It supports duplicate elements by maintaining a count of number of times an element appears in the collection. In this post, we will see how to use Multiset provided by Google’s Guava Library.

## Efficiently implement power function | Recursive and Iterative

Given two integers x and n where n is non-negative, efficiently compute the value of power function pow(x, n).

## Find Minimum and Maximum element in an array using minimum comparisons

Given an array of integers, find out minimum and maximum element present using minimum comparisons.

## Maximum Sum Subarray using Divide & Conquer

Given an array of integers, find maximum sum subarray among all subarrays possible.

## Find peak element in an array

Given an array, find peak element in it. A peak element is an element that is greater than its neighbors.

## Find number of 1’s in a sorted binary array

Given a sorted binary array, efficiently find the number of 1’s in it.

## Search in a nearly sorted array in log(n) time

Given a nearly sorted array such that each of the N elements may be misplaced by no more than one position from the correct sorted order, efficiently search a given element in it. Report if the element is not present in the input array.

## Find Floor and Ceil of a number in a sorted array

Given a sorted array of integers, find floor and ceil of a given number in it. The floor and ceil map the given number to the largest previous or the smallest following integer, respectively.

## Find smallest missing element from a sorted array

Given a sorted array of distinct non-negative integers, find smallest missing element in it.

## Count occurrences of a number in a sorted array with duplicates

Given a sorted array of integers containing duplicates, count occurrences of a number provided. If the element is not found in the array, report that as well.

## Recursive program to print reverse of a given string

Given a string, print it in reverse using recursion.   For example, consider the input string “Techie Delight”. The output should be “thgileD eihceT”.