Introduction Let’s say you have an array of n numbers, and this array can contain numbers from 0 to n-1. And for the numbers up to n, which are not present in the array, it has -1.  Now we have ...

Introduction Permutations are typically believed to be a mathematical topic, although this is not true. Mathematics is important in computer science because it teaches us how to communicate abstractly, work with algorithms, self-analyze our computational thinking, and represent real-world solutions ...

Introduction The nodes of the singly linked list contain two important pieces of information—first, the value they hold, and second, the pointer to the next node. The second property forms the basis for the traversal of a singly linked list. ...

Introduction This blog will discuss the operations that we can perform on Arrays in C/C++ programming languages. If you have prior knowledge of Arrays, you may proceed further. Okay, now let’s get started with Operations on Arrays in C/C++. Operations ...

Introduction Java has a predefined String class that represents character strings. All string literals in Java programs, such as “Hello”, are implemented as instances of this class. For a better grasp of each concept, this article on Strings in Java ...

Introduction Let’s say you have an array of integers and have to move all the zeros to the left of the array. You have to do this without changing the original order of non-zero numbers in the array. Let’s understand ...

Introduction The longest common subsequence (LCS) is defined as the longest subsequence that is common to all the given sequences, provided that the elements of the subsequence are not required to occupy consecutive positions within the original sequences. Note: Subsequence ...

Introduction Have you always wanted to learn about stacks? Do you also want to know how to implement it in code or a way to visualize it? Then, you are at the right place. This article aims to provide you ...

Introduction An array is the most used data structure. An array is a collection of elements of similar data types. Suppose there are 50 students in your class and you want to store the name of every student in your ...

Introduction  In functions, we’ve covered the two different types of invoking (or calling) – Call By Value (or Pass by value) and Call By Reference (or Pass by reference). If you are already familiar with these methods, you may proceed ...