How to remove duplicates from an array of integers in C++?

The following piece of code traverses the list of integers, removes duplicate numbers, if any, and returns the remaining list. #include <iostream> #include <vector> #include <algorithm> void removeDuplicates(std::vector<int> &list) { auto end = list.end(); for (auto i = list.begin(); i != end; ++i) { end = std::remove(i + 1, end, *i); } list.erase(end, list.end()); }... » read more

What is an Algorithm in coding?

Computer programs, no matter how big or small, are aimed to solve some kind of problems. As your intuition would suggest, a problem is a scenario that needs to be addressed or a task to be completed. In the Computer Science world, you can think of it in terms of input and output. A problem... » read more

A brief Introduction to Object-oriented programming in PHP

In this tutorial, you will learn the basic concepts of object-oriented programming that can be leveraged to write real-time modular apps. There are a bunch of benefits of using an object-oriented approach over the traditional procedural way of writing code, but the most significant advantages are secure data, reusability, and easy debugging. In a procedural... » read more

How to parse JSON data with JavaScript

JSON stands for JavaScript Object Notation. JSON is a human-readable format of data transmitted between a server and a browser. JSON data is stored in key/value pair in a file saved with .json extension. Even though the syntax of JSON looks similar to JS, it doesn’t need JS or any other language. JSON data exist... » read more

Explaining the Temporal Dead Zone & Hoisting in JavaScript

In old JavaScript times, variables were declared and defined using the var keyword. As you know that ECMAScript 2015 or JS ES6 brought a few new features to the language. From this version, you could declare variables using the let and const keywords. The major difference between var, let, and const is the way they... » read more

How to reverse a signed integer value in C++?

Below is an easy function to reserve a signed integer in C++ #include <iostream> #include <string> int reverse(int x) { int rev = 0; int max = 2147483647; int min = -2147483648; while (x != 0) { int pop = x % 10; x /= 10; if (rev > max / 10 || (rev ==... » read more

How to install React on Windows?

When I decided to learn React, I looked up the internet for the React tutorials. There are tons of articles, tutorials, courses on the internet that teaches you React. But unfortunately, I couldn’t find any tutorial that explains the installation process for the windows operating system. The tutorials online were mostly aimed at Mac/Linux audience... » read more

What is the difference between a Software and a Program?

You are not alone if you get confused with the terms – software, and programs and don’t know if they are the same thing or not. Not-so-tech-savvy people often consider software and program as synonymous terms that can be used interchangeably. But software and program aren’t the same things when you view these two at... » read more