TOP K problem, summary of the problem of the largest (smallest) element in the array

Problem Description: The largest k-th element was found in the unsorted array. Note that you need to look for the k-th largest element after array sorting, not the k-th different element. It is one of the questions often asked in interview. At the same time, it is also a good question to investigate the calculation of time complexity due to i ...

Posted by alex.hughson on Fri, 19 Jun 2020 23:02:21 -0700

Uboot 1.3.4 learning notes uboot configuration process

/mkconfig file analysis: Six important parameters of mkconfig script: Configure in the main makefile file: x210_sd_config : unconfig #$(@:_ config =) for the target_ config is replaced by "" to get x210_sd @$(MKCONFIG) $(@:_config=) arm s5pc11x x210 samsung s5pc110 #Output TEXT_BASE variab ...

Posted by jtapoling on Fri, 19 Jun 2020 22:28:33 -0700

Seven common sorting algorithms of comparison class (detailed explanation of python)

Seven common sorting algorithms of comparison class (detailed explanation of python) Seven common sorting algorithms of comparison classes Bubble sort, insert sort, select sort, fast sort, Hill sort, merge sort, heap sort explanation and python implementation Algorithm stability: for the values with e ...

Posted by hawkenterprises on Fri, 19 Jun 2020 22:03:29 -0700

Sword finger offer week 5 incomplete

Sword finger offer week 5 incomplete 73. Two numbers that only appear once in the array Except for two numbers in an integer array, other numbers appear twice. Please write a program to find out the two numbers that only appear once. You can assume that these two numbers must exist. Example Input: ...

Posted by pixy on Fri, 19 Jun 2020 21:35:32 -0700

Design and Implementation of Linux Kernel Chapter 6 Kernel Data Structure

Article Directory 1. Chain List Chain lists in the Linux kernel are special list_entry, container_of and offsetof macros An example illustrates `offsetof` and `container_of`Macro Operations on linked lists 1. Create a list of chains 2. Add Node to Chain List 3. Delete Nodes 4. Move merge nodes 5. D ...

Posted by Seol on Fri, 19 Jun 2020 18:25:09 -0700

You could have written less if else

“… He thinks that Blub language is enough, and then his thinking has been assimilated by Blub language "- Paul Graham, hackers and painters > preface I don't like the shuttle if/else statement in business code. It's complex and bloated. At least in terms of aesthetic feeling, swit ...

Posted by webtech123 on Fri, 19 Jun 2020 05:21:57 -0700

Hibernate Validator - object grouping validation (probably the most comprehensive explanation in the old world)

Then I broke it down last time. I didn't see the children's shoes in the first chapter Click here Play back the content of the previous chapter Entity class @Data @AgeSalaryType public class Student { private Long id; @NotBlank(message = "Name cannot be empty") private String name; @ ...

Posted by apol on Fri, 19 Jun 2020 04:52:25 -0700

JavaSE learning notes - Collections, Arrays, other classes

Java learning notes Tools Collections Collection and Collections method Example Arrays method Example analysis Others Date class Calendar Class practice Math class Link: jdk13_API. Tools Collections Collection and Collections The difference between Collection and Collections: Collecti ...

Posted by JackOfBlades on Fri, 19 Jun 2020 03:57:27 -0700

Redis based distributed lock implementation

From 1, Distributed lock overview In the multithreaded environment, in order to ensure that a code block can only be accessed by one thread at a time, we can generally use the synchronized syntax and ReetrantLock in Java to ensure that this is actually the way of local locking. But now companies are a ...

Posted by hillbilly928 on Fri, 19 Jun 2020 00:04:48 -0700

An article gives you a thorough understanding of the implementation of HashMap without worrying about being bullied.

Article catalog HashMap preface What is a red black tree Discoloration rotate Sinistral Dextral brief introduction Basic elements of HashMap Node Construction method HashMap() HashMap(int initialCapacity) HashMap(Map<? extends K, ? extends V> m) Add method put Get method get Expand resize ...

Posted by NoorAdiga on Thu, 18 Jun 2020 23:25:45 -0700