Aman Kumar has Published 94 Articles

2-3 Trees (Search and Insert) in C/C++?

Aman Kumar

Aman Kumar

Updated on 25-Jul-2025 17:12:28

893 Views

What is 2-3 Trees? A 2-3 tree is a tree data structure, where each internal node has either 2 or 3 children (also, we can say that 2-nodes and 3-nodes, respectively). It is a type of B-tree that ensures efficient search, insertion, and deletion operations with O(logn) time complexity. ... Read More

Are array members deeply copied in C++?

Aman Kumar

Aman Kumar

Updated on 24-Jul-2025 15:49:59

1K+ Views

In C++, an array member is simply the individual elements stored within an array. What is Deep Copy? A deep copy creates a new object and allocates separate memory for the dynamically allocated resources; it copies all the data members of the original object into the new object. So that ... Read More

2D vector in C++ with user defined size

Aman Kumar

Aman Kumar

Updated on 24-Jul-2025 15:33:39

3K+ Views

In this article, we will see how we create and use 2D vectors with user-defined sizes. What is 2D Vector? In C++, a vector is a dynamic array used to store elements. The 2D vector is a vector of vectors and are used to create a dynamic two-dimensional array where ... Read More

How do you get assembler output from C/C++ source in gcc?

Aman Kumar

Aman Kumar

Updated on 30-Jun-2025 13:22:39

3K+ Views

In this article, we will see how to generate the assembler output from C or C++ code using GCC. What is GCC The GCC, which stands for GNU Compiler Collection, is a set of compilers and development tools available for various operating systems such as Linux, Windows, and a wide ... Read More

Program for cube sum of first n natural numbers in C++

Aman Kumar

Aman Kumar

Updated on 30-Jun-2025 13:16:10

730 Views

In this article, We implement a C++ program to print sum of series like 13 + 23 + 33 + 43 + .......+ n3 till the nth term. Given an integer n, calculate the sum of the cubes of the first n natural integers. So, we have to cube of ... Read More

C++ Program to Implement B Tree

Aman Kumar

Aman Kumar

Updated on 30-Jun-2025 11:24:55

7K+ Views

In C++, a Binary tree is a generalization of the Binary Search Tree (BST). A B-tree can have more than two children. It is also known as a balanced tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. It is optimized for ... Read More

Checking if a double (or float) is NaN in C++

Aman Kumar

Aman Kumar

Updated on 18-Jun-2025 18:47:53

14K+ Views

In this article we will check whether a double or floating point number is NaN (Not a Number) in C++. Checking if a Double or Floating Point Number is NaN To check, we can utilise the isnan() method. The isnan() function is available in the cmath library. This function was ... Read More

Difference between namespace and class in C++

Aman Kumar

Aman Kumar

Updated on 18-Jun-2025 18:44:13

6K+ Views

In this article, we will see the differences between namespace and class in C++. Namespace and classes are two different concepts, so let's discuss them: Classes are datatypes. It is an expanded version of the structures. Classes can contain data members and functions as members, but namespaces can contain variables ... Read More

Variadic function templates in C++

Aman Kumar

Aman Kumar

Updated on 18-Jun-2025 18:43:09

364 Views

What is Variadic Function In mathematics and in computer programming, a variadic function is a function of indefinite arity, i.e., a function that accepts a variable number of arguments. So, In C++ programming, we can say that a function that accepts a variable number of arguments is variadic function. Why ... Read More

Difference between a virtual function and a pure virtual function in C++

Aman Kumar

Aman Kumar

Updated on 18-Jun-2025 18:40:06

7K+ Views

In C++, virtual and pure virtual functions are key features supporting polymorphism both allow different classes to respond uniquely to the same function call. What is Virtual Function A virtual function in C++ is a member function in a base class, which allows a function to be overridden in the ... Read More

Advertisements