## Code Random Recording Algorithm Training Camp Day4 | | 24. Exchange nodes in the linked list in pairs, 19. Delete the last N node of the linked list, interview questions 02.07. Linked list intersection, 142. Ring linked list II

24. Exchange the nodes in the linked list two by two Topic link: 24. Exchange Nodes in Linked List - Leetcode encountered difficulties None, but can't think of a recursive method answer 1. Iterative method After understanding the meaning of the question, it can be simply understood as the exchange of several numbers. Due to the speci ...

Posted by mwaw on Sun, 15 Jan 2023 21:28:14 +0300

## Java Collection Framework System - The whole system of Collection and Map from practicality, comparison to underlying analysis

Java Collection Framework System Summary Notice: This article cites a large number of high-quality articles, and some of the applied ones have links to directly view the in-depth analysis of knowledge points.As for the content involving the code section, it is presented in the form of Demo + annotations. Demo mainly involves basic and common ...

Posted by mrobertson on Sun, 18 Sep 2022 21:24:48 +0300

## Java advanced programming class set framework (collection class)

Introduction to the Class Set Framework ββββIn actual development, no development can leave the array, but the traditional array is very cumbersome to use, and the length is its fatal flaw. Officially, due to the length problem, it is impossible to use it on a large scale, but it is far from being used during development. Without arrays, we ca ...

Posted by cmgmyr on Sun, 18 Sep 2022 21:19:40 +0300

## Data structure - c language to realize basic operations such as adding, deleting, searching and modifying the leading circular double linked list (super long and super detailed)

1, Basic cognition What is a cycle The last node of the linked list points to the head node, forming a ring. Therefore, any other node can be found from any node in the circular linked list. What is a double linked list Two pointers are stored in the structure of the linked list, one pointing to the predecessor node and the other pointing t ...

Posted by kidestranged on Wed, 07 Sep 2022 21:55:27 +0300

## In depth understanding of ArrayList and LinkedList, source code analysis and performance testing

Spoiler: ArrayList's insertion and query operations are much faster than LinkedList ArrayList characteristic The bottom layer is realized by array, with fast query speed and slow addition, deletion and modification speed (in theory) Thread unsafe Common methods of ArrayList import java.util.ArrayList; import java.util.Iterator; import jav ...

Posted by cyrixware on Wed, 25 May 2022 15:49:26 +0300

## Three common implementation classes of Java List interface

List three common sets ArrayList (key) ArrayList is a typical implementation class and main implementation class of the List interface. In essence, ArrayList is a "variable length" array of object references. summary ArrayList class is an array that can be dynamically modified. The difference from ordinary arrays is that it has no f ...

Posted by techcone on Sun, 22 May 2022 10:18:32 +0300

## [Data structure] chain stack

definition Chained stack is a data storage structure, which can be implemented in the form of a singly linked list. The advantage of using a chained stack is that it can overcome the low space utilization of sequential stacks implemented with arrays, but it needs to be used for each stack element. Allocate additional pointer space for storing ...

Posted by roughie on Sun, 22 May 2022 02:28:20 +0300

## JAVA data structure and algorithm -- single chain surface test questions (Sina, Baidu, Tencent)

Common interview questions of single linked list Find the number of effective nodes in the single linked list Find the penultimate node in the single lin k ed list (Sina) Reversal of single linked list (Tencent) Print the single linked list from end to end (Baidu requires mode 1: reverse traversal. Mode 2: stack stack) Example 1: find the ...

Posted by lin on Sat, 21 May 2022 17:37:32 +0300

## Big talk data structure - Summary

Big talk data structure - Summary Read the book "Dahua data structure" and summarize some things; The summary is rough. Some ideas can't be understood for the time being. Put them aside first, and then go back to digest these knowledge points after learning other things 1. Data structure A data structure is a collection of ...

Posted by redrabbit on Sat, 21 May 2022 01:17:44 +0300

## P1792 [national training team] planting trees

Problem surface Luogu preface At the beginning, I don't want to write this question, because I can't write a linked list (it seems that I haven't written it several times). Finally, with the encouragement (oppression) of the coach, he made up for his knowledge about the linked list and barely passed the problem. (after all, the linked list was ...

Posted by pablocullen on Fri, 20 May 2022 23:16:04 +0300