Queue Data Structure Implementation Using an Array

Write a program to implement a queue using an array.  In this tutorial, You are going to learn about Queue data structure and their implementation using an array in C, C++ & Java. In my previous posts, I have explained Stack and Linked List data structure.

Queue Data Structure

In Queue data structure, An element is inserted at one end called rear and deleted at other end called front. As compared to stack data structure in which insertion and deletion are allowed only at one end. Queue data structure is also called FIFO (First In First out).

PHP Traits Explanation with Example

PHP Traits

PHP Traits

PHP 5.4 introduces the concept of traits. In PHP 5.4 version several new features was introduced, one such feature was PHP traits.

PHP traits help us to minimize code duplication in our codebase. Until the concept of traits, PHP uses classical inheritance model in which one class can inherit only one class. But sometimes, it is beneficial to inherit from multiple classes to avoid code duplication. To solve this problem, PHP community introduces the concept of traits.

Java Program to Check Prime Number

Write a Java program to check prime number. Given an input integer, We have to write an efficient code to check whether a number is prime or not.

Before writing a program, let’s quickly understand what is a prime number.

Prime Number

A prime number is a number that is greater than 1 and it has no positive divisors other than 1 and itself.

For example – 3, 13, 7  is a prime number, as it’s divisible by 1 and itself. Similarly, 29, 19 etc. are also prime numbers.

6 is not a prime number as it’s divisible by 1, 2, 3 and 6.

 2 is the only even prime number.


How to check whether a number is prime or not in Java

How to Install PHP 7 on Ubuntu

PHP 7 , the latest version of PHP was already released. It was released on December 3rd, 2015. PHP 7 comes with a number of new features, and the most amazing feature is  speed. PHP 7 provides an incredible performance boost to your web applications.

Here is the benchmark of PHP 7. PHP 7 benchmark.

In this tutorial, you’ll learn how to install PHP 7 on Ubuntu.

How to Install PHP, MySql, Apache in Ubuntu

How to Get Current Date and Time in Javascript

How to get current date and time in Javascript. How to display current date and time in Javascript.

In javascript date object is used to get current date and time. Using javascript date object our script can display and use the current date and time of a user system.

Let’s check how to get current date time in javascript.

How to Access Localhost from Anywhere using Any Device

How to access localhost from anywhere using any device.

How to Access Localhost from Anywhere

How many times, you have been working on an application (or an app) and you have designed and completed your application nicely. You have set up everything very nicely on your local system. Now you want to show this work to your client, who is sitting on a remote location.  Also, you want to test this application on a different device ( such as mobile, tablets etc). To do these things, either you have to host your application on a public server, or you can use any service which allows to access localhost from anywhere.