Exploring Pointer Arithmetic in C Language: Part 1

Exploring Pointer Arithmetic in C Language: Part 1

What is the essence of the C language? More than 90% of C engineers would definitely say it is pointers. Pointers are something that C engineers both love and hate. They are often a nightmare for many junior engineers, with terms like dangling pointers, wild pointers, and memory leaks… each one can make you lose … Read more

C Language Data Structures: Complete Implementation of a Handwritten HashMap (Reusable + High Performance)

C Language Data Structures: Complete Implementation of a Handwritten HashMap (Reusable + High Performance)

Understanding HashMap in One Image The structure implemented using an array + linked list (chaining method) is shown below:Key Points Recap: HashMap uses an array (buckets), where each bucket stores a conflict linked list (or other structures). The hash function maps the key to a hash value, and then the modulus operation is used to … Read more

A Brief Discussion on Stacks and Queues in Embedded Data Structures

A Brief Discussion on Stacks and Queues in Embedded Data Structures

Stack 1. Basic Concept of Stack A stack (Stack) is a linear list that allows insertion or deletion only at one end. First, a stack is a type of linear list, but it restricts operations to only one end for insertion and deletion. The end where insertion and deletion are not allowed is called the … Read more

Advanced Self-Learning Notes on Python: The Fourth Knowledge Point – Dictionaries

Advanced Self-Learning Notes on Python: The Fourth Knowledge Point - Dictionaries

Dictionaries 1. Core Features Format: Composed of key-value pairs, separated by commas, and enclosed in { }. Order: In Python 3.7+, dictionaries maintain insertion order; unordered in 3.6 and earlier. Mutability: Supports adding, deleting, and modifying key-value pairs (the dictionary itself is mutable). 2. Element Rules: Key: Must be an immutable type (e.g., int, str, … Read more

C4Core: A Practical C++ Utility Library

C4Core: A Practical C++ Utility Library

C4Core: A Practical C++ Utility Library C4Core is a cross-platform C++ utility library that provides developers with many convenient features. The design goal of this library is to offer efficient, concise, and easy-to-use tools to help developers complete various tasks more effectively. 1. Main Features (1) Character Conversion C4Core provides efficient character conversion capabilities, including … Read more

Decoding the Contents of FPGA Bitstreams

Decoding the Contents of FPGA Bitstreams

After adjusting the FPGA code, we generate a bitstream. Have you ever wondered what exactly is contained within this bitstream? Today, we will decode what is inside the FPGA bitstream.The image below shows the bitstream from a project I worked on, and here is a screenshot after opening it.First, let’s take a look at the … Read more

C Language Algorithm – Flatten Binary Tree to Linked List

Today’s algorithm problem is to solve the "Flatten Binary Tree to Linked List" algorithm using C language. Below are my algorithm ideas and implementations. Let's take a look. Algorithm Problem Given a binary tree, flatten it to a linked list. The flattened linked list should follow the preorder traversal of the original binary tree. Algorithm … Read more

C Language Algorithm: Identical Trees

Today's algorithm problem is to solve the "Identical Trees" algorithm using C language. Below are my algorithm ideas and implementation. Let's take a look. Algorithm Problem Given two binary trees, determine if they are identical. They are considered identical if they have the same structure and their node values are the same. Algorithm Idea The … Read more

C Language Algorithm – Longest Palindromic Substring

Today's algorithm problem is to solve the "Longest Palindromic Substring" problem using C language. Below are my algorithm ideas and implementation. Let's take a look. Algorithm Problem Given a string, find the longest palindromic substring within it. Algorithm Idea We will use the center expansion algorithm to solve the longest palindromic substring problem. The idea … Read more

C Language Algorithm – Permutation Problem

Today's algorithm problem is to solve the "permutation" algorithm using C language. Here are my algorithm ideas and implementation. Let's take a look. Algorithm Problem Given an array of integers nums without duplicate numbers, return all possible permutations. A permutation is a unique reordering of the elements in an array. Algorithm Idea To solve the … Read more