原创 功能算法

Android 連擊實現 // 數組長度表示要點擊的次數 long[] mHits = new long[3]; public void onClick(View view) { System.ar

原创 Android Gradle Plugin v3.6.0/3.6.1 構建Bug

升級AndroidStudio AGP(Android Gradle Plugin)到 3.6.0/3.6.1版本後打包會出現如下異常: Execution failed for task ':app:minifyRelease

原创 IntelliJ IDEA UML插件

在IntelliJ IDEA Ultimate 版本中自帶了一個UML插件:UMLSupport 查看了Community版本和AndroidStudio 發現沒有這個插件。 要使用這個插件導出需要的UML圖,操作如下: 步驟一

原创 macOS 去掉系統軟件更新紅點提示

當前系統提示更新到macOS Catalina 。打開終端執行以下命令: 第一步運行: sudo softwareupdate --ignore "macOS Catalina" 第二步運行: defaults dele

原创 【LeetCode 15. 3Sum】

Description: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find al

原创 【LeetCode 14. Longest Common Prefix】

描述: 寫一個函數來查找字符串數組中的最長公共前綴。 如果不存在公共前綴,返回空字符串 “”。 示例1: 輸入: ["flower","flow","flight"] 輸出: "fl" 示例2: 輸入: ["dog","race

原创 【LeetCode 12. Integer to Roman】

描述: 羅馬數字包含以下七種字符:I,V,X,L,C,D和M。 字符 數值 I 1 V 5 X 10 L 50 C

原创 【LeetCode 9. Palindrome Number】

描述: 判斷一個整數是否是迴文數。迴文數是指正序(從左向右)和倒序(從右向左)讀都是一樣的整數。 示例 1: 輸入: 121 輸出: true 示例2: 輸入: -121 輸出: false 解釋: 從左向右讀, 爲 -121

原创 【LeetCode 8. String to Integer (atoi)】

題目: 請你來實現一個atoi函數,使其能將字符串轉換成整數。 首先,該函數會根據需要丟棄無用的開頭空格字符,直到尋找到第一個非空格的字符爲止。接下來的轉化規則如下: 如果第一個非空字符爲正或者負號時,則將該符號與之後面儘可能多

原创 【LeetCode 6. ZigZag Conversion】

Description: The string "PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you ma

原创 【LeetCode 7. Reverse Integer】

Description: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Exampl

原创 【LeetCode 5. Longest Palindromic Substring】

Description: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length

原创 【LeetCode 2. Add Two Numbers】

Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored

原创 【LeetCode 3. Longest Substring Without Repeating Characters】

Description: Given a string, find the length of the longest substring without repeating characters. Example 1: Inpu

原创 【LeetCode 1.Two Sum】

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may a