前言: 大家好我是草莓,第一次參加iT邦鐵人賽不知道該寫怎樣的主題,也處於猶豫該不該從韌體工程師轉職軟體工程師的階段。 小弟的背景為中後段科大碩畢業,目前在南部...
題目: https://leetcode.com/problems/two-sum/ 給一個陣列,返回兩個數字的索引,使它們相加到特定目標。 解題思路: 使用2...
題目: https://leetcode.com/problems/reverse-integer/ 反轉32bits的整數,須注意溢位的問題。 解題思路: 藉...
題目: https://leetcode.com/problems/valid-parentheses/ 一個字串中包含'(' , ')', '{', '}',...
題目: https://leetcode.com/problems/remove-duplicates-from-sorted-array/ 一個排列好的陣列,...
題目: https://leetcode.com/problems/remove-element/ 回傳不等於目標值外的長度。 解題思路: 利用for迴圈判斷陣...
題目: https://leetcode.com/problems/search-insert-position/ 已知一個排序好的陣列與目標值,如有找到目標值...
題目: https://leetcode.com/problems/powx-n/ 計算平方數值。 解題思路: 利用遞迴概念求出平方值。 C版本: double...
題目: https://leetcode.com/problems/plus-one/ 給一個陣列把最後一個數字加一,如需要進位把該數字變成零下一進位值加一。...
題目: https://leetcode.com/problems/merge-sorted-array/ 2個排序好的陣列,合併成一個排序好的陣列。 解題思路...