Qingquan Li

Results 164 issues of Qingquan Li

# Example Graph Consider the following graph, which we'll use for demonstrating DFS and BFS: ``` 1 / \ 2 3 / / \ 4 5 6 ``` - Node...

Data Structure

In college, before taking a particular course, students, usually, must take all its prerequisite courses, if any. For example, before taking the Programming II course, the student must take the...

Data Structure

# LinkedStackDemo/LinkedStackType.h ```c++ // This class specifies that basic operations on a stack // as a linked list. #ifndef LINKEDSTACKTYPE_H #define LINKEDSTACKTYPE_H // Defination of the node template struct node...

C++
Data Structure

# StackADT.h ```c++ // This abstract class StackADT specifies the basic operations on a stack. // This class defines these operations as an ADT (Abstract Data Type). #ifndef STACKADT_H #define...

C++
Data Structure

# 1NF 2NF 3NF **1NF (First Normal Form):** - Single valued attributes: Each column must contain only one value. - No duplicate rows. - Every column value is atomic (indivisible)....

Database

```c++ #include /** * Merge two sorted sub-arrays into one sorted sub-array * @param arr: the array to be sorted * @param first1: the index of the first element of...

Algorithms

Reference: Book: *Data Structures Using C++ (Second Edition, D.S. Malik)* # 1. Linked Lists A linked list is a collection of components, called `nodes`. Every node (except the last node)...

C++
Data Structure

Another demonstration: https://github.com/Qingquan-Li/DoublyLinkedListDemo Reference: _Book: Data Structures Using C++ (Second Edition, D.S. Malik)_ A doubly linked list is a linked list in which every node has a next pointer and...

C++
Data Structure

The `this` pointer is a built-in pointer that every class has. It is passed as a hidden argument to all **nonstatic** member functions, and it always points to the instance...

C++

> Concept: C++ allows you to redefine how standard operators work when used with class objects. # 1. Unary Operator Overloading Overloading the unary minus (`-`) operator to negate the...

C++