[TDD]LeetCode 58. Length Of Last Word
- 732
- 0
- LeetCode 練功房
LeetCode 第三題 "Longest Substring Without Repeating Characters"
LeetCode 第 231 題:"Power of Two",相當單純的題目。
Given an integer, write a function to determine if it is a power of two.
LeetCode 第九題 Palindrome Number ,判斷一個數字是否為「回文」。
Determine whether an integer is a palindrome. Do this without extra space.
LeetCode 的第 1 題 "Two Sum",題目描述如下。
用 TDD 來練習完成 LeetCode 的第 2 題,題目描述如下。
Given an integer, write a function to determine if it is a power of three.
Follow up:
Could you do it without using any loop / recursion?
用 TDD 來練習完成 leet code 的第 220 題,題目描述如下。
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and nums[j] is at most t and the absolute difference between i and j is at most k.
用 TDD 來練習完成 leet code 的第 219 題,題目描述如下。
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the absolute difference between i and j is at most k.