原创 leetcode 12. Integer to Roman

1.題目 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999

原创 leetcode 13. Roman to Integer

1.題目 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 399

原创 leetcode 16. 3Sum Closest

1.題目 Given an array S of n integers, find three integers in S such that the sum is closest to a given numbe

原创 leetcode 17. Letter Combinations of a Phone Number

1.題目 Given a digit string, return all possible letter combinations that the number could represent. A mappin

原创 leetcode 24. Swap Nodes in Pairs

1.題目 Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->

原创 leetcode 21. Merge Two Sorted Lists

1.題目 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing

原创 leetcode 14. Longest Common Prefix

1.題目 Write a function to find the longest common prefix string amongst an array of strings. 找出所有字符串的最長公共前綴。

原创 leetcode 28. Implement strStr()

1.題目 Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if

原创 leetcode 18.4Sum

1.題目 Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = targ

原创 leetcode 27. Remove Element

1.題目 Given an array and a value, remove all instances of that value in place and return the new leng

原创 leetcode 31. Next Permutation

1.題目 Implement next permutation, which rearranges numbers into the lexicographically next greate

原创 leetcode 25. Reverse Nodes in k-Group

1.題目 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.

原创 leetcode 29. Divide Two Integers

1.題目 Divide two integers without using multiplication, division and mod operator. If it is overfl

原创 Swift 3.0 學習筆記-1-基礎語法

Swift 3.0 學習筆記-1-基礎語法 標籤(空格分隔): iOS Swift 聲明 swift3.0 學習筆記主要參考蘋果開發者官網The Swift Programming Language (Swift 3.1)教程 以及

原创 Swift 3.0 學習筆記-4-控制流

Swift 3.0 學習筆記-4-控制流 標籤(空格分隔): iOS Swift 前言: swift3.0 學習筆記主要參考蘋果開發者官網The Swift Programming Language (Swift 3.1)教程 以及