Linked list related interview questions Chapter 2

Catalogue of series articles preface 1, Circular linked list Circular linked list 1. Title Description Given a linked list, judge whether there are links in the linked list.If there is a node in the linked list that can be reached again by continuously tracking the next pointer, there is a ring in the linked list. In order ...

Posted by edtlov on Wed, 09 Feb 2022 22:19:31 +0100

Chapter 4 stack and queue

Chapter 4 stack and queue A stack is a linear table that is restricted to insert and delete operations only at the end of the table. We call the end that allows insertion and deletion as the top of the stack, the other end as the bottom of the stack, and the stack without any data elements as an empty stack. Stack is also called last in first ...

Posted by BillyBoB on Wed, 09 Feb 2022 12:59:52 +0100

Brother Jiang takes you to play with C language | 10- C language array

Basic concept of array Array, literally, means a set of data. Yes, array is used to store a set of data In C language, array belongs to construction data type Several nouns of array Array: an ordered collection of data of the same data typeArray element: each data that constitutes an array.Subscript of array: index of array element pos ...

Posted by kat89 on Wed, 02 Feb 2022 01:08:42 +0100

C language uses GNU extension to realize simple intelligent pointer

C language uses GNU extension to realize intelligent pointer GNU/C has one__ attribute__ The extension is called cleanup: https://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/Variable-Attributes.html#Variable-Attributes Its function is to automatically execute a bound function when a variable is out of its scope This out of scope can be out of curly ...

Posted by sweyhrich on Mon, 31 Jan 2022 15:54:59 +0100

Brother Jiang takes you to play with C language | 17 - file operation

Basic concepts of documents File stream: c language regards a file as a sequence of characters, that is, a file is a character stream composed of one character. Therefore, c language also calls a file a file stream. Document classification text file It is stored in ASCII format, and one character is stored in one byte. Each byte of ...

Posted by gentusmaximus on Mon, 31 Jan 2022 14:12:06 +0100

Data structure life from scratch - array and pointer basis (including personal in-depth understanding)

Freshmen enter the data structure. Please give advice on mistakes and omissions and make progress with you. Arrays and pointers What is an array A contiguous space (clearly telling the compiler how many blocks of space there are) is used for the same type of data The name of the array is for the user to see. In the actual memory, the ad ...

Posted by Morbid on Sun, 30 Jan 2022 16:22:55 +0100

A Leecode every day - find the median of two positive arrays and share with Tencent high-frequency interview questions!

Find the median of two positively ordered arrays Method 1: binary search Given two ordered arrays, it is required to find the median of two ordered arrays. The most intuitive ideas are as follows: Using the merging method, merge two ordered arrays to get a large ordered array. The element in the middle of a large ordered array is the median. ...

Posted by moonshaden on Fri, 28 Jan 2022 17:59:01 +0100

C + + pointer: (including two-dimensional array, two-level pointer, dynamic two-dimensional array, memory continuity)

C + + pointer: (including two-dimensional array, two-level pointer, dynamic two-dimensional array, memory continuity) In the creation and use of C + + array, this paper briefly introduces the use of pointers in the array, but there are some other problems. Here we mainly expand some about two-dimensional array pointers, secondary pointers and ...

Posted by safra on Thu, 27 Jan 2022 04:53:28 +0100

Java vs Golang: basic syntax

Coding specification Code layout 1. Curly bracket wrap style In Java, each statement is marked with a semicolon " Separation, whether to wrap or not does not affect the correctness of the code. In python, semicolon separation is eliminated, and the effect of parentheses on code logic is also eliminated (various parentheses in python ar ...

Posted by agent47 on Sun, 23 Jan 2022 04:27:10 +0100

[c language] recognize string character function + memory function | simulation implementation | strlen strcpy strcat strcmp strstr strtok memcpy memmove memset memcmp

Introduction to character function + memory function a key Find string length strlen String function with unlimited length strcpy,strcat,strcmp Introduction to string functions with limited length strncpy,strncat,strncmp String lookup strstr,strtok Error message report strerror Memory operation function memcpy,me ...

Posted by yorktown on Sat, 22 Jan 2022 19:49:06 +0100