原创 線程有哪些狀態?每個狀態是什麼意思?又是如何切換的?

線程大家都有在使用,但是有時候也僅僅是使用,對它的一些行爲還不是特別的瞭解,今天就來和大家談談線程的狀態這個內容。 首先線程有哪些狀態呢? 這個問題,我們可以從Java的源代碼中找到的答案,先簡單粗暴,直接貼上代碼,看看線程的狀態有哪些:

原创 音頻接口:MIC, LINE IN, AUX都是些啥

最近一直想內錄自己那臺電鋼的聲音到手機裏,畢竟外錄,會錄製到空氣裏的聲音,還有聲音直接通過手機麥克風錄製效果也不好。 一開始我是買了一根公對公的3.5mm音頻線,直接從電鋼接到手機上,然而並沒有卵用,可能是我直接用公對公直連是沒用的,應該要

原创 797. All Paths From Source to Target

題目 https://leetcode.com/problems/all-paths-from-source-to-target/ Given a directed, acyclic graph of N nodes. Find all

原创 921. Minimum Add to Make Parentheses Valid

題目 Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positi

原创 814. Binary Tree Pruning

題目 https://leetcode.com/problems/binary-tree-pruning/ We are given the head node root of a binary tree, where additional

原创 890. Find and Replace Pattern

https://leetcode.com/problems/find-and-replace-pattern/ 題目 You have a list of words and a pattern, and you want to know

原创 894. All Possible Full Binary Trees

題目 https://leetcode.com/problems/all-possible-full-binary-trees/ A full binary tree is a binary tree where each node has

原创 942. DI String Match

題目 Given a string S that only contains "I" (increase) or "D" (decrease), let N = S.length. Return any permutation A of [

原创 961. N-Repeated Element in Size 2N Array

題目 In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times. Return

原创 1008. Construct Binary Search Tree from Preorder Traversal

題目 Return the root node of a binary search tree that matches the given preorder traversal. (Recall that a binary search

原创 701. Insert into a Binary Search Tree

題目 https://leetcode.com/problems/insert-into-a-binary-search-tree/ Given the root node of a binary search tree (BST) and

原创 535. Encode and Decode TinyURL

題目 https://leetcode.com/problems/encode-and-decode-tinyurl/ Note: This is a companion problem to the System Design probl

原创 938. Range Sum of BST

題目 Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclus

原创 807. Max Increase to Keep City Skyline

題目 In a 2 dimensional array grid, each value grid[i][j] represents the height of a building located there. We are allowe

原创 坑!IDEA如何將依賴的模塊導入Jar包

如果想將依賴的庫在導出jar的時候也可以用到,那麼直接從右邊的【Available Elements】中拖到左邊是沒用的。 對着右邊的東西點右鍵,有兩個菜單 1【Put into Output Root】 2【Extract into O