Binary Search using Recursion in Java

Write a program to implement a Binary search using recursion in java. In this tutorial, I am going to discuss binary search algorithm and it’s implementation using recursion in Java.

In my previous tutorial, i have explained how to implement binary search in java using iterative approach.

Find Sum of Array Elements using Recursion – Java Code

Write a java program to find sum of array elements using recursion. Given an array of integers, we have to write a java code to calculate sum of array elements using recursion.

Subscribe Our Tutorials

Get Latest Updates on Facebook

For example :

Input: arr[] = {2, 5, 6, 8, 9, 12}

Output : 42 (2+5+6+8+9+12)

Java Program to Find Missing Number in Array

Write a java program to find missing number in array. Given an array of n-1 integers and these integers are in the range of 1 to n. One of the integer is missing from an array. We have to write an efficient java code to find missing number from an array. An array does not contains any duplicates.

PHP Composer : Manage Package Dependency in PHP

What’s a PHP composer? How to use PHP composer in your PHP Application? What are the benefits of using composer in your application?

PHP Composer is a dependency manager. It manages the dependency of PHP packages in your application. Using composer you can pull the required library and dependencies and manage them in one place. The concept of a composer is similar to npm in node.js and gem in Ruby.

Let’s first understand what is a dependency.

Magic Methods in PHP

What are PHP Magic Methods?

PHP Magic methods are a specialized method that is executed in response to a specific event. Each magic methods start with two underscores(__) and it is called automatically when a certain condition is met. It triggers custom behaviors defined by a programmer inside the class. Some of the magic methods are __construct(), __destruct(),  __toString(),  __get(),  __set(), __call() etc.

In this tutorial, we are going to explore these magic methods.

PHP Magic Methods

PHP Magic Methods