## Finding the number that occurs odd number of times

Another puzzle that can be solved with eXclusive OR operator is to find the number that occurs odd number of

## Pascal triangle in scala

To start with any new programming language and for understanding the language fundamentals we will try to execute some Hello

## Finding duplicates in an array using negation, single scan -O(n)

If the array elements are positive numbers and also elements are in the range 0 to n-1 , then we

## Finding duplicates in a sorted array – O(nlogn)

Duplicates in the array can be found by general Brute force solution in the O(n^2) time. Can there be any

## Finding Duplicates in an array -BruteForce [O(n^2)]

Finding duplicates in an array is a common interview question. The problem statement can be defined as follows. Given an

## Towers of Hanoi using Recursion in Java

Towers of Hanoi is a mathematical puzzle, consists of three towers (rods or pegs) and number of disks of different

## Reversing an array using Recursion in Java

Reversing an array using Recursion is an example of Tail Recursion . We maintain two in-variants “i” and “j”. “i” holds

## Linear Sum using Recursion in Java

Linear Sum, sum of the “n” array elements can be computed easily by looping through the elements, this can be

## Fibonacci series using Recursion in Java

Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers by definition, the first two numbers in the Fibonacci sequence are 1 and 1,

## Power of a given number using Recursion in Java

Power of a given number, x is a mathematical operation, written as  x^n. involving two numbers, the base x and the exponent  (or index or power)