原创 Get to know Lambda and Functional Interfaces in Java 8

In simple words, a lambda expression is an instance of a functional interface. But a lambda expression itself does not

原创 Java Collections - Array 和 String 常用函數

Array基本操作 完整代碼請戳?GitHub~ Array to String 使用 Arrays.toString(...) 將數組轉換爲基本字符串。 String[] array = new String[] {"One", "T

原创 Java hashCode() and equals() – Contract, rules and best practices

A good article to talk about Java hashCode and equals. 

原创 中國電信 CTExcel - 親測境外首選電話卡(推薦碼:SHQL 或 KJNC)

官網 中國電信美洲公司CTExcel https://www.ctexcel.us/index_pc.jsp?language=zh 微信公衆號 - “中國電信美洲公司” 親測好用 因爲公司內部調動,12月要去美國工作。機緣巧合,看到了網

原创 React 入門 04 - props 和 state

前言 在前文React 入門 03 - 元素與組件中學習了React基礎元素與組件,今天來探究一下React組件的兩個基本屬性props和state的用法與區別。 它們的一個重要的不同點就是:props是傳遞給組件的(類似於函數的形參),

原创 React 入門 03 - 元素與組件

前言 從 React 入門 02 - JSX 學習了JSX的基本用法,本文我們開始深入探討React 元素與組件。 React 元素 元素是構成React引用的最小磚塊,描述了你在屏幕上想看到的內容。與瀏覽器的 DOM 元素不同,Reac

原创 React 入門 01 - Hello World

前言 基於項目需求,最近開始不得不接觸前端開發的領域啦。吼吼,從此是不是可以自稱全棧開發了🤣~  此係列學習筆記依然是以幫助自己學習、消化以及回憶爲目的,將會涉及學習React,Type Script 以及目標 React Native

原创 React 入門 02 - JSX

前言 在 React 入門 01 - Hello World中,簡單瞭解了下React基本概念以及如何運用到Html中。現在我們學習一下在React中配合使用最多的JSX相關知識。 JSX JSX,是一個 JavaScript 的語法擴展

原创 LeetCode(130) Surrounded Regions

題目 Given a 2D board containing 'X' and 'O' (the letter O), capture all regions surrounded by 'X'. A region is captu

原创 探析求樹中兩個節點p和q的最低公共祖先

題目 樹中兩個節點的最低公共祖先。 分析 描述十分簡潔的題目,其實有多種變體; 我們從4種情況來討論: 情況1,在二叉搜索樹中找節點p和q的最低公共祖先情況2,非二叉搜索樹,只是普通的二叉樹,樹中每個節點包含指向父節點的指針情況3

原创 LeetCode(387)First Unique Character in a String

題目 Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1

原创 LeetCode(349)Intersection of Two Arrays

題目 Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2

原创 LeetCode(344) Reverse String

題目 Write a function that takes a string as input and returns the string reversed. Example: Given s = "hello", return

原创 LeetCode(386)Lexicographical Numbers

題目 Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,

原创 LeetCode(371) Sum of Two Integers

題目 Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a