原创 LeetCode Algorithms 46. Permutations
題目難度: Medium 原題描述: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3]
原创 LeetCode Algorithms 17. Letter Combinations of a Phone Number
題目難度: Medium 原題描述: Given a digit string, return all possible letter combinations that the number could represent.
原创 進程的概念、狀態轉換和進程控制塊
1. 爲什麼要引入進程 通常的程序是不能併發執行的,因爲併發執行會使它們具有間斷性、失去封閉性,並且其結果不可再現。 爲了使程序能夠併發執行,並且對程序加以描述及控制,引入了進程的概念。 2. 進程的定義
原创 死鎖的概念、處理方法
1 產生死鎖的原因 (1)競爭資源。進程競爭數量不足的資源。 (2)進程間推進順序非法。進程請求和釋放資源的順序不當。 2 產生死鎖的必要條件 (1)互斥條件 進程對分配到的資源進行排他
原创 進程和線程的區別
進程和線程的區別 1. 在沒有引入線程的操作系統中,進程是系統進行資源分配和調度的基本單位。但是在引入線程的操作系統中,進程是資源擁有的基本單位,線程則是作爲調度和分派的基本單位。 2.進程是操作系統中擁有資源的基本單位;而線程一般不
原创 LeetCode Algorithms 55. Jump Game
題目難度: Medium 原題描述: Given an array of non-negative integers, you are initially positioned at the first index of the arr
原创 LeetCode Algorithms 33. Search in Rotated Sorted Array
題目難度: Medium 原題描述: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.
原创 算法概論習題8.8 證明精確的4SAT問題是NP完全問題
算法概論習題8.8 證明精確的4SAT問題是NP完全問題 題目描述: 8.8. In theEXACT4SATproblem, the input is a set of clauses, each of which is a dis
原创 LeetCode Algorithms 47. Permutations II
題目難度: Medium 原題描述: Given a collection of numbers that might contain duplicates, return all possible unique permutati
原创 LeetCode Algorithms 5. Longest Palindromic Substring
題目難度: Medium 原題描述: Given a string s, find the longest palindromic substring in s. You may assume that the maximum le
原创 LeetCode Algorithms 42. Trapping Rain Water
題目難度: Hard 原題描述: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute