• 119
• 0

...繼續閱讀 »

• 131
• 0

...繼續閱讀 »

• 135
• 0

...繼續閱讀 »

### LeetCode: 83. Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.

...繼續閱讀 »

### LeetCode: 70. Climbing Stairs

You are climbing a stair case. It takes n steps to reach to the top.

Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?

Note: Given n will be a positive integer.

...繼續閱讀 »

Given two binary strings, return their sum (also a binary string).

The input strings are both non-empty and contains only characters `1` or `0`.

...繼續閱讀 »

### LeetCode: Maximum Subarray

Given an integer array `nums`, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.

...繼續閱讀 »

### LeetCode: Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.

...繼續閱讀 »

### LeetCode: Remove Duplicates from Sorted Array

Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.

...繼續閱讀 »

### LeetCode: Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.

...繼續閱讀 »

...繼續閱讀 »

...繼續閱讀 »

...繼續閱讀 »

...繼續閱讀 »

### LeetCode: Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings.

If there is no common prefix, return an empty string `""`.

...繼續閱讀 »

### LeetCode: Two Sum

Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

...繼續閱讀 »

### 單一責任原則 Single Responsibility Principle (SRP)

SRP的主要精神是提高內聚力，高內聚力意味著你只能想到一個理由去改變它!

...繼續閱讀 »

...繼續閱讀 »

### .Net 設計模式: 模式和模式目錄介紹

#### GOF模式:由四位建立者命名，可分為三種模式:

1.創建者模式: 抽象工廠(abstract factory)、工廠方法(factory method)、建造者(builder)、原型(prototype)、單例(singleton)