Lunski's Clutter

This is a place to put my clutters, no matter you like it or not, welcome here.

0%

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
2
Input: nums = [2,2,1]
Output: 1

Example 2:

1
2
Input: nums = [4,1,2,1,2]
Output: 4

Example 3:

1
2
Input: nums = [1]
Output: 1
Read more »

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
2
Input: ["h","e","l","l","o"]
Output: ["o","l","l","e","h"]

Example 2:

1
2
Input: ["H","a","n","n","a","h"]
Output: ["h","a","n","n","a","H"]
Read more »

這篇開始要跟大家分享我怎麼會想開始重訓的,因為受傷的關係一直很怕吃太多又不能做有氧,意外開始飲食控制與重訓的旅程。

Read more »

種植前可以先查一下根系選擇適合盆栽,避免軸根遇到淺盆倒塌。

再來就是介質(土壤,水,石頭等),這篇就讓我們來探討這些介質吧

Read more »