racla.github.io's Issues
46 Permutations | Racla's Blog
https://racla.github.io/46-Permutations/
Intuition & AlgorithmIt’s a dynamic programming question. Suppose we have get the permutations of i number, the i+1th number will be added to the previous solution set. For Each permution in the p
82 Remove Duplicates from Sorted List II | Racla's Blog
https://racla.github.io/82-Remove-Duplicates-from-Sorted-List-II/
IntuitionThere are several stuff to notice: Remove the duplicates, keep no one of them Find the duplicates by three pointers: pre,cur and next, indicating previous node current node and next node. Wh
MySQL ACID | Racla's Blog
https://racla.github.io/MySQL-ACID/#more
MySQL ACID 本文所有内容仅仅是对MySQL官方文档稍作整理,增加一些作者自己的理解。 随着业务数据和任务需求的增长,可靠性成了MySQL数据库的重要诉求(Redis早期仅有单句的增删改查,事务是随着业务需求变得复杂才增加的)。ACID正是实现MySQL可靠性的设计原则。 下文以InnoDB存储引擎为例简述了MySQL中如何体现ACID设计原则。 A(原子性), C(一致性), D(持
47 Permutations II | Racla's Blog
https://racla.github.io/47-Permutations-II/
Intuition & AlgorithmRecall how we get permutations for numbers without duplication: for each permutation in last solution set, we insert the new number to all possible places. We won’t have any d
25 Reverse Nodes in k-Group | Racla's Blog
https://racla.github.io/25-Reverse-Nodes-in-k-Group/#more
Intuition & AlgorithmThe very intuitive method to solve this problem is: splice the List into k nodes a group reverse the group list reconnect groups A simple implementation is recursion, first
147 Insertion Sort List | Racla's Blog
https://racla.github.io/147-Insertion-Sort-List/
Intuition & AlgorithmThe diagram and illustration in the question have given us a clear description of insertion sort algorithm. Separate the list into two parts: sorted and sorting Insert the he
ReentrantLock | Racla's Blog
https://racla.github.io/ReentrantLock/
Data StructureAs shown in above picture, ReentrantLock has only one property: sync of type Sync, which extends from AbstracQueueSynchronizer, AQS in brief. AQS is a synchronzier for many classes in J.
19 Remove Nth Node From End of List | Racla's Blog
https://racla.github.io/19-Remove-Nth-Node-From-End-of-List/
Intuition & AlogorithmSince it’s a singly linked list, we’d can only count the number of the node from head to tail. The equavalent question of this is remove the (N-n+1)-th node from the head of
216 Combination Sum III | Racla's Blog
https://racla.github.io/216-Combination-Sum-III/
Intuition & AlgorithmNumbers 1-9 can be seen as candidates in the previous questions, the constraints of this question are: We can only pick one number one time, but we can only pick k numbers. A
148 Sort List | Racla's Blog
https://racla.github.io/148-Sort-List/
Intuition & AlgorithmThe diagram and illustration in the question have given us a clear description of insertion sort algorithm. Separate the list into two parts: sorted and sorting Insert the he
24 Swap Nodes in Pairs | Racla's Blog
https://racla.github.io/24-Swap-Nodes-in-Pairs/
Intuition & Algorithm Question 25 is a more general question of this one. Suppose there are three pairs
23 Merge k Sorted Lists | Racla's Blog
https://racla.github.io/23-Merge-k-Sorted-Lists/
IntuitionThis seems to be a general question of merging two sorted lists. The naive method of this question is quite intuitive. If you are interested in more efficient solutions, skip to Partition Alg
Https | Racla's Blog
https://racla.github.io/Https/#more
How does HTTPS provide securityThe primitive promotion of HTTPS over http is security. Messages are transferred naked in http which may be utilized by an eavesdropper.It’s pretty natural to think that
Java | Racla's Blog
https://racla.github.io/Java/#more
Java基础编译和解释 (待补充) C/C++ 编译器将源代码最终编译为机器指令,因此如果要在不同机器上运行程序需要重新编译源码。Java使用另一种方式实现跨平台,即Java虚拟机(JVM)。首先Java编译器(javac, java compiler)将源代码编译为.class文件,当我们需要将程序运行到其他机器上只需要拷贝.class文件运行即可(假设机器都已经安装JVM), JVM会根据具体
143 Reorder List | Racla's Blog
https://racla.github.io/143-Reorder-List/#more
IntuitionFrom the description of this question, we need three steps to achieve the reorder operation for a singly linked list: seperate the list into two parts reverse the right part merge the left p
49 Group Anagrams | Racla's Blog
https://racla.github.io/49-Group-Anagrams/
Intuition & AlgorithmThe primitive problem of this question is how to define anagrams. The definition from wikipedia is: An anagram is a word or phrase formed by rearranging the letters of a diff
40 Combination Sum II | Racla's Blog
https://racla.github.io/40-Combination-Sum-II/
Intuition & AlgorithmI think it’s better to compare this question with last question 39 Combination Sum. Their difference is: One number can appears multiple times, but can only be used once. In
55 Jump Game | Racla's Blog
https://racla.github.io/55-Jump-Game/
Intuition & AlgorithmIt’s a typical dynamic programming problem, so we can find three kinds of solution. Recursion Memoization Bottom-up Each element in the array represents the maximum length w
147 Insertion Sort List | Racla's Blog
https://racla.github.io/147-Insertion-Sort-List/
Intuition & AlgorithmThe diagram and illustration in the question have given us a clear description of insertion sort algorithm. Separate the list into two parts: sorted and sorting Insert the he
87 Scramble String | Racla's Blog
https://racla.github.io/87-Scramble-String/#more
IntuitionThis is a dynamic programming problem. Given two string S1(1,2,3,...,n) and S2(1,2,3,...,n), they are scramble if and only if: S1(1,2,3,...,i) and S2(1,2,3,...,i) are scramble and S1( i+1,..
39 Combination Sum | Racla's Blog
https://racla.github.io/39-Combination-Sum/#more
Intuition && AlgorithmIt’s dfs+dynamic programming problem. To get all the possible combination adding up to the target, we need to solve several subproblems. Before all, let’s think about whe
120 Triangle | Racla's Blog
https://racla.github.io/120-Triangle/#more
IntuitionThe broute-force solution for this method is to list all the possible path, and then get the minimum.In the top layer of the triangle, we can only choose index 0. In the second layer, we can
86 Partition List | Racla's Blog
https://racla.github.io/86-Partition-List/#more
IntuitionThis question is one step of quick sort: split the list into two parts by a sentinal. We need three pointers to deal with the classifying process: One pointer denotes the right border of the
ReentrantLock | Racla's Blog
https://racla.github.io/ReentrantLock/
Data StructureAs shown in above picture, ReentrantLock has only one property: sync of type Sync, which extends from AbstracQueueSynchronizer, AQS in brief. AQS is a synchronzier for many classes in J.
61 Rotate List | Racla's Blog
https://racla.github.io/61-Rotate-List/#more
Intuition & AlgorithmRemove the last k nodes before the head node. Code12345678910111213141516171819202122232425/** * Definition for singly-linked list. * public class ListNode { * int va
99 Recover Binary Search Tree | Racla's Blog
https://racla.github.io/99-Recover-Binary-Search-Tree/
Intuition & AlgorithmAccording to the location of the two nodes being exchanged, it can be divided into five cases, assuming that the original sequence is 1,2,3,4,5,6,7,the two node locations exch
100 Same Tree | Racla's Blog
https://racla.github.io/100-Same-Tree/
Intuition & AlgorithmThe question asks whether the structure of the two binary trees and the values of the nodes are the same. This question has a strong reference significance on how to judge whe
ReentrantLock | Racla's Blog
https://racla.github.io/ReentrantLock/
Data StructureAs shown in above picture, ReentrantLock has only one property: sync of type Sync, which extends from AbstracQueueSynchronizer, AQS in brief. AQS is a synchronzier for many classes in J.
377 Combination Sum IV | Racla's Blog
https://racla.github.io/377-Combination-Sum-IV/#more
Intuition & AlgorithmAt the first glampse of this question, I write down the dfs algorithm immediately. It works of course, but will encounter the Time Exceed error. The problem here isit costs to
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.