Implementing a Contact Management System in C

Building a Small Address Book in C Mini Project: Address Book System Requirements: Store contact information: Name, Gender, Phone Maximum capacity: 50 contacts Functional requirements: Add a contact Delete a contact by name Modify a contact by name Search contacts by name or phone (supports fuzzy search) Display all contacts Exit the system ...

Posted on Sun, 02 Aug 2026 16:21:01 +0000 by benjy

Southwest University for Nationalities 2023 Programming Competition Selection Problems and Solutions

L1-1 Thank You, Karl! This problem requires outputting a specific formatted string. The output contains an emoticon with escaped backslashes. Reference Implementation #include <bits/stdc++.h> using namespace std; int main() { cout << "Thank You Karl!\\\\(>_<)/" << endl; return 0; } L1-2 It's Fantasy ...

Posted on Sat, 01 Aug 2026 16:26:03 +0000 by bender

Binary Tree Algorithm Challenges: Minimum Difference, Modes, and Lowest Common Ancestor

Finding the Minimum Absolute Difference in a BSTGiven the properties of a Binary Search Tree (BST), an in-order traversal processes nodes in ascending order of their values. Consequently, the smallest absolute difference between any two nodes in the tree must exist between two adjacent nodes in this sorted sequence. We can implement a recursive ...

Posted on Thu, 30 Jul 2026 16:47:13 +0000 by MitchEvans

Topological Sorting: Detecting DAGs and Resolving Competition Rankings

Topological sorting is a fundamental graph algorithm with critical applications in determining whether a directed graph contains cycles. This technique is extensively used in build systems, course scheduling, and dependency resolution. Problem A: Topological Sort for Directed Acyclic Graphs The core challenge involves producing a valid topologi ...

Posted on Thu, 30 Jul 2026 16:35:06 +0000 by dlester

Understanding HashCode: Collision Resolution and Practical Implications in HashMap

What is a Hash Collision? When discussing hash collisions, we need to understand the fundamental issue: different objects processed through the same hash algorithm produce identical hash values. Consider HashMap's internal structure—a combination of an array with linked lists. When a key-value pair is inserted, the hash code determines which ar ...

Posted on Wed, 29 Jul 2026 16:18:10 +0000 by jonsjava

Data Structures Implementations: Leaf Counting, Linked List Insertion, and Unique Like Ranking

Counting Leaf Nodes in a Binary Tree Calculate the number of leaf nodes within a binary tree. A leaf node is defined as a node where both the left and right child pointers are null. #include <stdio.h> #include <stdlib.h> typedef char ElemType; typedef struct BiTNode { ElemType data; struct BiTNode *lchild, *rchild; } BiTNod ...

Posted on Tue, 28 Jul 2026 16:53:11 +0000 by glence

C# Collections, Sorting, Generics, and Data Structures

Why Use Collections? Arrays have fixed sizes—once allocated, their length cannot change. This rigidity leads to either wasted memory (if oversized) or the need for code changes when requirements evolve. Collections, in contrast, dynamically resize as elements are added or removed. Generic List<T> List<T> is a strongly typed collecti ...

Posted on Tue, 28 Jul 2026 16:32:46 +0000 by Nymphetamine

Data Structures: Stack, Queue, and Deque

Stack Imagine organizing a closet by placing winter clothes first, then summer clothes on top. When summer arrives, you grab the summer clothes first from the top without disturbing the items below. A stack is a container that allows storing, accessing, and removing elements exclusively from one end called the top. This constraint means the ele ...

Posted on Mon, 27 Jul 2026 16:10:14 +0000 by sunnyk

Implementing a Sorted Singly Linked List in C

A singly linked list is built using a structure containing data and a pointer to the next node. This dynamic data strcuture supports efficient insertion, deletion, and traversal operations. Below is a concise implementation that maintains elements in ascending order during insertion: #include <stdio.h> #include <stdlib.h> typedef s ...

Posted on Sun, 26 Jul 2026 17:18:45 +0000 by dlgilbert

Determining the Winning Team in a Programming Contest

In a programming team competition, each team consists of multiple members who compete individually. The team's total score is the sum of all its members' scores, and the team with the highest total wins. Given the scores of all participants, write a program to identify the champion team. Input Format The first line provides a positive integer N ...

Posted on Sun, 26 Jul 2026 16:25:41 +0000 by egiblock