C Base with your handwriting redis sds

Preface - Simple Dynamic Strings antirez built this project because it wanted to unify SDS code in Redis, Disque, Hiredis projects https://github.com/antirez/sds For more background information, you can read README.md. The sds project is a trade-off implementation of the C-string data structure in the real world, and the library itself is no ...

Posted by Joshua F on Mon, 02 Dec 2019 00:52:32 +0100

C + data structure and algorithm

1. Definition of single chain table Each node includes a data domain and a pointer domain. The addresses of nodes in memory can be discontinuous, but the internal addresses of nodes must be continuous. 2. Structure definition typedef struct Lnode{ int data; struct Lnode *next; }Lnode,*LinkList; 3. Creation of single chain table 1) head inserti ...

Posted by darrensw on Sun, 01 Dec 2019 15:39:25 +0100

Implementation of data structure and algorithm with sequential table C

Please refer to the data for related concepts such as sequence table, which is mainly implemented here. Note: 1. Implementation of sequence table C language; 2. It can be implemented in a simpler way, which is mainly helpful for understanding. It can be modified and improved on this basis; 3. Provide several simple functions, which can be added ...

Posted by jammer on Sun, 01 Dec 2019 14:28:40 +0100

#The way to brush questions with leetcode 18-sum of four numbers

Given a n array of N integers nums a n d a target value target, judge whether there are four elements a, b, c and D in nums, so that the value of a + b + c + d is equal to target? Find all quads that meet the conditions and are not repeated.Be careful:The answer cannot contain duplicate quads. Example:Given array nums = [1, 0, -1, 0, -2, 2], a ...

Posted by Hagbard on Sun, 01 Dec 2019 03:11:59 +0100

Reverse order and serpentine output matrix

Reverse order and serpentine output matrix Reverse order Input n, get the n*n matrix, output the element values anticlockwise, and separate them with spaces.For example, n=4, the matrix is1 2 3 45 6 7 89 10 11 1213 14 15 16The output content is: 1 23 4 8 12 16 15 13 9 5 6 7 11 10. Analysis First of all, this is a boundary problem. ...

Posted by run_GMoney on Sat, 30 Nov 2019 19:50:07 +0100

Find the correct mobile number

Title: it is known that the mobile phone number is an 11 digit string composed of 0-9 and so on. Now, it is judged whether it is the correct mobile phone number according to the entered characters Requirements: 1. If the input string starts with any group of 151, 153, 173, 180, 193 and consists of just 11 digits, then the output is:% s is ok ...

Posted by jholzy on Sat, 23 Nov 2019 16:58:48 +0100

Static registration and dynamic registration of JNI development

Alibaba P7 mobile Internet architect advanced video (in daily update) for free, please click: https://space.bilibili.com/474380680 Static registration Principle:According to the function name, the one-to-one correspondence between java method and JNI function is established; Implementation process: Write java code;Using javah instruction to gen ...

Posted by ace_lovegrove on Fri, 22 Nov 2019 10:30:21 +0100

[scheduler] II. Scheduler initialization

Process 0 initializes the relevant structure of the scheduler, and transforms the scheduling class of process 0 into idle ﹣ sched ﹣ class scheduling class The first function to start executing C language code from assembly code from arch/arm64/kernel/head.S is start_ Start_kernel ----- > sched_init(), let's take a look at t ...

Posted by mgrphp on Thu, 21 Nov 2019 19:05:18 +0100

socket programming 15: how to keep the server listening to the client's requests?

The previous program, no matter the server or the client, has a problem, that is, it exits immediately after processing a request, which is not of great practical significance. Can you always accept requests from clients like a Web server? Yes, just use the while loop. Modify the echo program so that the server can continuously ...

Posted by smacpettit on Mon, 11 Nov 2019 19:48:26 +0100

The realization and basic operation of sequential linear table

Ever since I saw the platform of "think or not" in Zhihu, I always wanted to write something; I also wanted to communicate with more people and learn something.The teaching material of school data structure is teacher Yan Weimin's "data structure (C language version)". In the teaching material, the class C language between p ...

Posted by rondog on Sat, 09 Nov 2019 15:10:22 +0100