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.
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.
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.
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 7 Features Explained with Code Examples.
PHP 7 is the newest version of PHP released last year. PHP community has introduced a lot of new features in their latest version. In this tutorial, we are going to learn about new features added in PHP 7.
Write a java program to find second largest number in an array. Given an unsorted array, write a java code to find 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.
What is an interface in PHP? An interface is an important concept in an object oriented programming.
In this tutorial, we’ll discuss following points.
1. What is an interface?
2. How to create an interface in PHP.
3. What’s the importance of using an interface in our PHP application?
Interface in PHP
What is an Interface in PHP?
An Interface defines a contract for what a class can do, without saying anything about how the class can do it. Through interfaces, we define what a class can do, the classes that implement interface define how it can do it.
To understand the concept of an interface let’s take an example of a caching system. There are different types of caching available such as File system, Memcache, Redis etc. First, we need to define what a cache can do (I mean different operations), how we do it? we can do it through an interface. A class (Such as Memcache, Redis etc) which implements cache interface will define how they will do it.
NOTE – An interface will not add any additional functionality in your code but it outlines a standard format to which your classes need to use.
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 tutorial, We are going to learn bubble sort algorithm and it’s implementation in java. We are going to discuss following points in this tutorial.
i) Bubble Sort Algorithm.
ii) Bubble sort program in java (How we can sort an unsorted array using bubble sort algorithm).
iii) Bubble sort video tutorial.