Validate if a given string can be interpreted as a decimal number.
【LeetCode】0771. Jewels and Stones
You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels.
【LeetCode】0066. Plus One
Given a non-empty array of digits representing a non-negative integer, plus one to the integer.
【面試】簡易實做 AutoComplete - Python
這大概是我有經驗來最神奇的面試經驗了(●▼●;)
面試時間一個小時,基本上就是就一個人寫code,另外一個人一直看著寫code..XD。想當然爾,面試結果想當然是被考官狠狠洗臉了 QAQ
(圖片來源: Heraklion Innovation Map)
【LeetCode】0043. Multiply Strings
Given two non-negative integers num1
and num2
represented as strings, return the product of num1
and num2
, also represented as a string.
【LeetCode】0071. Simplify Path
Given an absolute path for a file (Unix-style), simplify it.
For example,
path = "/home/"
, => "/home"
path = "/a/./b/../../c/"
, => "/c"
path = "/a/../../b/../c//.//"
, => "/c"
path = "/a//b////c/d//././/.."
, => "/a/b/c"
In a UNIX-style file system, a period (‘.’) refers to the current directory, so it can be ignored in a simplified path.
【LeetCode】0208. Implement Trie (Prefix Tree)
Implement a trie with insert
, search
, and startsWith
methods.
【LeetCode】0189. Rotate Array
Given an array, rotate the array to the right by k steps, where k is non-negative.
【LeetCode】0140. Word Break II
Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences.
【LeetCode】0139. Word Break
Given a non-empty string s and a dictionary wordDict containing a list of non-emptywords, determine if s can be segmented into a space-separated sequence of one or more dictionary words.