Linked List Algorithms from Code Thinking Record
Table of Contents
Introduction
Remove Linked List Elements (LeetCode--203)
Design Linked List (LeetCode--707)
Reverse Linked List (LeetCode--206)
Swap Nodes in Pairs (LeetCode--24)
Remove Nth Node From End of List (LeetCode--19)
Linked List Cycle II (LeetCode--142)
Introduction
Following the Code Thinking Record series, this article explores ...
Posted on Sun, 31 May 2026 19:14:58 +0000 by gingerboy101
Mastering std::tuple in Modern C++: Creation, Access, and Advanced Utilities
std::tuple is a fixed-size collection of heterogeneous values introduced in C++11. It serves as a generalized pair, allowing developers to group disparate types without defining a custom struct. The template signature accepts a variadic pack of types:
template<class... Types>
class tuple;
Unlike dynamic containers, its layout and size ar ...
Posted on Sun, 31 May 2026 17:21:07 +0000 by Alith7
Enumerating Palindromic Dates Efficiently for NOIP Popularization Group 2016
Online Judge Reference:
http://ybt.ssoier.cn:8088/problem_show.php?pid=1974
Core Concepts
The problem requires identifying dates that are both valid calendar dates and palindromes. A naive approach iterates through every 8-digit number between the start and end dates, resulting in a complexity of O(10^8). While this might pass, it is computat ...
Posted on Sat, 30 May 2026 23:30:16 +0000 by greg252
Robust Custom Container Implementation and Stream-based Data Aggregation
Dynamic Type-Safe Buffer Implementation
This module defines a generic container managing dynamic memory using templates. It enforces type safety and includes built-in validation for index boundaries.
#pragma once
#include <iostream>
#include <stdexcept>
#include <string>
template<typename T>
class ResizableArray {
publi ...
Posted on Fri, 29 May 2026 20:07:14 +0000 by Draco_03
C/C++ System Development Reference: Debugging, Libraries, and Build Tools
Locating Segmentation Faults with GDB and Core Dumps
Ensure the source code is compiled with the -g flag to embed debugging symbols.
Check core file size limit: Run ulimit -c. A return value of 0 means core dumps are disabled; unlimited means no size restriction. Use ulimit -a to view all resource limits.
Enable unlimited core size: ulimit -c ...
Posted on Fri, 29 May 2026 19:10:11 +0000 by globalinsites
C++ Structures, Pointers, and Arrays: Core Concepts
This section delves into fundamental C++ concepts: structures, pointers, and arrays. While C++ inherits many of these ideas from C, it introduces powerful enhancements, particularly in the realm of structures.
C++ Structures
In C++, structures (struct) build upon their C counterparts by allowing the inclusion of member functions (methods) along ...
Posted on Fri, 29 May 2026 18:16:22 +0000 by Liquidedust
Implementing Custom Operator Behavior in C++
Operator overloaidng enables custom types to define their own behavior for standard operators. The compiler recognizes overloaded operators through a consistent naming convention combining 'operator' with the symbol being overloaded.
Overloading Addition Operator
Both member functions and global functions can implement addition between classes ...
Posted on Thu, 28 May 2026 18:01:39 +0000 by sanahoria
Understanding C++ Classes and Objects: A Deep Dive into OOP Fundamentals
Table of Contents
Origins of the Class Keyword
Class Definitions
Access Specifiers and Encapsulation
Memory Layout of Classes
The this Pointer
Constructors (Implicitly Generated Function 1/6)
Destructors (Implicitly Generated Function 2/6)
Copy Constructors (Implicitly Generated Function 3/6)
Assignment Operator Overloading (Implicitly Generat ...
Posted on Thu, 28 May 2026 16:06:47 +0000 by raul_7
Algorithmic Solutions for Seasonal Contender Selection Examination
Problem A: String Substitution Logic
Process a single input line character by character. Output each character sequentially. If the current character is a dot, append the string xixixi. to the output stream immediately.
#include <iostream>
#include <string>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
...
Posted on Wed, 27 May 2026 22:34:47 +0000 by sander_ESP
Button Widgets in Qt for C++ GUI Development
QPushButton
QPushButton is derived from QAbstractButton, an abstract base class for all button types.
Property
Description
text
The label displayed on the button.
icon
An icon shown on the button.
iconSize
Dimensions of the icon.
shortcut
Keyboard shortcut to trigger the button.
autoRepeat
If true, holding the mouse button trigge ...
Posted on Wed, 27 May 2026 16:15:37 +0000 by RedMaster