Aman Kumar has Published 94 Articles

C++ Program to Implement Interval Tree

Aman Kumar

Aman Kumar

Updated on 28-May-2025 16:31:44

850 Views

What is an Interval Tree? An interval tree is a tree data structure that stores intervals. It helps us to efficiently find all intervals that overlap with a specific interval or point. The purpose is to enhance a self-balancing Binary Search Tree (BST) known as Interval Tree, which is similar ... Read More

C++ Program to Implement Circular Singly Linked List

Aman Kumar

Aman Kumar

Updated on 27-May-2025 16:41:54

14K+ Views

A circular singly linked list is a type of data structure that is made up of nodes that are created using self-referential structures. Each node contains two components, namely the data element and the reference to the next node in the list. Only the reference to the head node is ... Read More

Pure virtual destructor in C++

Aman Kumar

Aman Kumar

Updated on 27-May-2025 16:34:52

765 Views

A pure virtual function is a function that has no implementation in the base class and must be overridden by any derived class. It is declared using = 0 in the base class. Pure Virtual Destructor When we want the base class to be abstract then we declare a pure ... Read More

C++ Program to Implement Fusion Tree

Aman Kumar

Aman Kumar

Updated on 27-May-2025 16:33:56

652 Views

A fusion tree is a tree data structure that implements an associative array on w-bit integers. Here, W is the number of bits in the integer. A fusion tree is used to maintain the ordered set of elements. It uses a combination of a B-tree and a hash table that ... Read More

Virtual Destructor in C++

Aman Kumar

Aman Kumar

Updated on 27-May-2025 16:32:51

2K+ Views

A virtual destructor is a destructor declared within the base class with a virtual keyword. In C++, destructors are special members of a class that frees memory occupied by an object when a memory leak occurs. Deleting a derived class object using a pointer to a base class, the base ... Read More

Virtual Constructor in C++

Aman Kumar

Aman Kumar

Updated on 27-May-2025 16:31:50

23K+ Views

In C++, we cannot create a virtual constructor, this is because C++ is a statically typed language and the constructor is responsible for creating an object. So, the compiler needs to know the exact type of object at compile time. The virtual mechanism works only when we have a base ... Read More

Virtual functions in derived classes in C++

Aman Kumar

Aman Kumar

Updated on 26-May-2025 12:49:45

1K+ Views

Virtual Functions in Derived ClassesA virtual function is declared using the virtual keyword in the base class and becomes a member function of the base class overridden by the derived class. It becomes virtual in every class which is derived from the base class. So, the keyword virtual is not ... Read More

Default arguments and virtual function in C++

Aman Kumar

Aman Kumar

Updated on 22-May-2025 18:28:36

317 Views

Default Argument A default argument is a value provided during the function declaration that can be automatically assigned if no argument is provided when the function is called. If a value is passed at the time of the function call, this default value is overridden, and the argument becomes a parametrized ... Read More

C++ Program to Implement Dequeue

Aman Kumar

Aman Kumar

Updated on 22-May-2025 18:14:56

12K+ Views

A deque is a double-ended queue linear data structure where elements can be added or removed from both the front and rear ends. Unlike a standard queue which is FIFO. A dequeue can function in both FIFO and LIFO modes. Application of Dequeue Deques are useful in a situation where ... Read More

C++ Program to Implement Sorted Doubly Linked List

Aman Kumar

Aman Kumar

Updated on 22-May-2025 18:12:31

2K+ Views

Sorted Doubly Linked List A sorted doubly linked list is a type of doubly linked list in which elements are arranged in a specific order, typically ascending or descending based on the data values. Where, insertion operation makes sure that the new node is placed in its correct sorted position. ... Read More

Previous 1 ... 4 5 6 7 8 ... 10 Next
Advertisements