原创 LeetCodeOJ. Palindrome Number

試題請參見: https://oj.leetcode.com/problems/palindrome-number/ 題目概述 Determine whether an integer is a palindrome. Do thi

原创 LeetCodeOJ. Linked List Cycle

試題請參見: https://oj.leetcode.com/problems/linked-list-cycle/ 題目概述 Given a linked list, determine if it has a cycle i

原创 LeetCodeOJ. Valid Palindrome

試題請參見: https://oj.leetcode.com/problems/valid-palindrome/ 題目概述 Given a string, determine if it is a palindrome, cons

原创 Vijos1090. 連續數之和

試題請參見: https://vijos.org/p/1090 題目概述 有n個正整數排成一行。你的目的是要從中取出一個或連續的若干個數,使它們的和能夠被k整除。 例如,有6個正整數,它們依次爲1、2、6、3、7、4。若k=3,則你可以取

原创 LeetCodeOJ. Excel Sheet Column Title

試題請參見: https://oj.leetcode.com/problems/excel-sheet-column-title/ 題目概述 Given a positive integer, return its corresp

原创 POJ1579.Function Run Fun

試題請參見: http://poj.org/problem?id=1579 題目概述 We all love recursion! Don’t we? Consider a three-parameter recursive

原创 POJ2531.Network Saboteur

試題請參見: http://poj.org/problem?id=2531 題目概述 A university network is composed of N computers. System administrators

原创 LeetCodeOJ. Longest Common Prefix

試題請參見: https://oj.leetcode.com/problems/longest-common-prefix/ 題目概述 Write a function to find the longest common prefix

原创 Vijos1066. 弱弱的戰壕

試題請參見: https://vijos.org/p/1066 題目概述 永恆和mx正在玩一個即時戰略遊戲, 名字嘛~~~~~~恕本人記性不好, 忘了-_-b.  mx在他的基地附近建立了n個戰壕, 每個戰壕都是一個獨立的作戰單位, 射程

原创 LeetCodeOJ. Maximum Depth of Binary Tree

試題請參見: https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/ 題目概述 Given a binary tree, find its maximum depth

原创 LeetCodeOJ. Symmetric Tree

試題請參見: https://oj.leetcode.com/problems/symmetric-tree/ 題目概述 Given a binary tree, check whether it is a mirror of it

原创 LeetCodeOJ. Single Number

根據 耗子哥(左耳朵耗子) 的推薦, 最近轉移至LeetCodeOJ刷題. 試題請參見: https://oj.leetcode.com/problems/single-number/ 題目概述 Given an array of in

原创 Vijos1128.選數

試題請參見: https://vijos.org/p/1128 題目概述 已知 n 個整數 x1,x2,…,xn, 以及一個整數 k(k<n). 從 n 個整數中任選 k 個整數相加, 可分別得到一系列的和. 例如當 n=4,

原创 LeetCodeOJ. String to Integer (atoi)

試題請參見: https://oj.leetcode.com/problems/string-to-integer-atoi/ 題目概述 Implement atoi to convert a string to an integer.

原创 LeetCodeOJ. Valid Parentheses

試題請參見: https://oj.leetcode.com/problems/valid-parentheses/ 題目概述 Given a string containing just the characters '(',