Aman Kumar has Published 37 Articles

Default arguments and virtual function in C++

Aman Kumar

Aman Kumar

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

286 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

11K+ 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

1K+ 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

Virtual Functions and Runtime Polymorphism in C++

Aman Kumar

Aman Kumar

Updated on 22-May-2025 18:11:33

6K+ Views

In C++, both virtual functions and runtime polymorphism are key features that enable dynamic behavior and code flexibility. Virtual Functions A virtual function is the member function that is declared in the base class using the keyword virtual and is overridden in the derived class. The virtual function enables runtime ... Read More

C++ Program to Implement Sorted Singly Linked List

Aman Kumar

Aman Kumar

Updated on 22-May-2025 18:10:45

3K+ Views

A singly linked list is a type of linear data structure where each node contains two items: The data and a link to the next node in the list. Where, first node is called as head node and the last node is called the tail. So, you can traverse the ... Read More

C++ Program to Implement Double Order Traversal of a Binary Tree

Aman Kumar

Aman Kumar

Updated on 21-May-2025 14:47:09

195 Views

Double Order Traversal Double order traversal means each node in a tree is traversed twice in a particular order. A binary tree is a non-linear data structure where each node contains at most two children (i.e, left and right). Therefore, suppose we have a given binary tree, and the task ... Read More

C++ Program to Construct an Expression Tree for a given Prefix Expression

Aman Kumar

Aman Kumar

Updated on 21-May-2025 14:45:41

5K+ Views

What is Expression Tree?An expression tree is a binary tree used to represent expressions. In an expression tree, internal nodes correspond to operators, and each leaf node corresponds to an operand. Let's see an expression and construct a tree for [5 + ((4+3)*2)]. Constructing an Expression TreeOur task is ... Read More

C++ Program to Implement Circular Doubly Linked List

Aman Kumar

Aman Kumar

Updated on 21-May-2025 14:43:08

6K+ Views

Circular Doubly Linked ListA circular linked list is called a circular doubly linked list in which each node has two links connecting it to the previous node and the next node. In Circular Doubly Linked List two consecutive elements are linked or connected by previous and next pointer and the ... Read More

C++ Program to Implement Sorted Circularly Doubly Linked List

Aman Kumar

Aman Kumar

Updated on 21-May-2025 14:37:29

767 Views

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

Program to Find Area of an Ellipse using C++

Aman Kumar

Aman Kumar

Updated on 21-May-2025 14:30:43

518 Views

An ellipse is the locus on all those points in a plane such that the sum of their distance from two fixed points in the plane is constant. Where the fixed point is known as foci, which are sounded by the curve, the fixed line is a directrix, and the ... Read More

Advertisements