136. Single Number
Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.
Follow up: Could you implement a solution with a linear runtime complexity and without using extra memory?
Example 1:
1 | Input: nums = [2,2,1] |
Example 2:
1 | Input: nums = [4,1,2,1,2] |
Example 3:
1 | Input: nums = [1] |
344. Reverse String
Write a function that reverses a string. The input string is given as an array of characters char[].
Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.
You may assume all the characters consist of printable ascii characters.
Example 1:
1 | Input: ["h","e","l","l","o"] |
Example 2:
1 | Input: ["H","a","n","n","a","h"] |
重訓的吃
這篇開始要跟大家分享我怎麼會想開始重訓的,因為受傷的關係一直很怕吃太多又不能做有氧,意外開始飲食控制與重訓的旅程。