# 查看完整版本 : LeetCode

darigold 2015-3-29 08:37 AM

## LeetCode

[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-maximum-depth-of-binary-tree.html]LeetCode OJ - Maximum Depth of Binary Tree[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-same-tree.html]LeetCode OJ - Same Tree[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-number-of-1-bits.html]LeetCode OJ - Number of 1 Bits[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-pascals-triangle.html]LeetCode OJ - Pascal's Triangle[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-balanced-binary-tree.html]LeetCode OJ - Balanced Binary Tree[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-minimum-depth-of-binary-tree.html]LeetCode OJ - Minimum Depth of Binary Tree[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-surrounded-regions.html]LeetCode OJ - Surrounded Regions[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-two-sum.html]LeetCode OJ - Two Sum[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-longest-substring-without.html]LeetCode OJ - Longest Substring Without Repeating Characters[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-single-number.html]LeetCode OJ - Single Number[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-plus-one.html]LeetCode OJ - Plus One[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-majority-element.html]LeetCode OJ - Majority Element[/url]

[[i] 本帖最後由 darigold 於 2015-7-18 04:52 AM 編輯 [/i]]

darigold 2015-4-2 10:22 PM

## 唔好俾佢停啊

[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-reverse-bits.html]LeetCode OJ - Reverse Bits[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-rotate-array.html]LeetCode OJ - Rotate Array[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-count-and-say.html]LeetCode OJ - Count and Say[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-path-sum.html]LeetCode OJ - Path Sum[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-factorial-trailing-zeroes.html]LeetCode OJ - Factorial Trailing Zeroes[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-house-robber.html]LeetCode OJ - House Robber[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-length-of-last-word.html]LeetCode OJ - Length of Last Word[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-excel-sheet-column-number.html]LeetCode OJ - Excel Sheet Column Number[/url]
[url=http://andrew-algorithm.blogspot.com/2015/03/leetcode-oj-excel-sheet-column-title.html]LeetCode OJ - Excel Sheet Column Title[/url]
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-merge-k-sorted-lists.html]LeetCode OJ - Merge k Sorted Lists[/url]
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-binary-tree-level-order.html]LeetCode OJ - Binary Tree Level Order Traversal[/url]
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-intersection-of-two-linked.html]LeetCode OJ - Intersection of Two Linked Lists[/url]

[[i] 本帖最後由 darigold 於 2015-7-18 05:00 AM 編輯 [/i]]

Susan﹏汪汪 2015-4-2 10:39 PM

if lhs.count != rhs.count {
return true
}
for idx in 0..<lhs.count {
if lhs[idx] != rhs[idx] {
return true
}
}
return false
}

public func ==<T : Equatable>(lhs: OrderedSet<T>, rhs: OrderedSet<T>) -> Bool {

if lhs.count != rhs.count {
return false
}
for idx in 0..<lhs.count {
if lhs[idx] != rhs[idx] {
return false
}
}
return true
}

public struct OrderedSet<T : Comparable> : CollectionType {

private var root: OrderedSetNode<T>?

public init() {

}

public init<S : SequenceType where T == S.Generator.Element>(_ sequence: S) {

for item in sequence {
self.insert(item)
}
}

public var startIndex: Int {
return 0
}
public var endIndex: Int {
return root?.weight ?? 0
}

public var count: Int {
return root?.weight ?? 0
}

public func contains(member: T) -> Bool {
return root?.contains(member) ?? false
}

public subscript (position: Int) -> T {
return root![position]
}

public mutating func insert(member: T) {
if isUniquelyReferencedNonObjC(&root) {
root!.insert(member)
root!.weightCheck()
return
} else if let _root = root {
root = _root.clone
root!.insert(member)
root!.weightCheck()
return
}
root = OrderedSetNode(member)
}

public func generate() -> GeneratorOf<T> {
var _view = root?.view.0
return GeneratorOf {
if _view != nil {
let value = _view!.value
_view = _view!._next
return value
}
return nil
}
}

public var isEmpty: Bool {
return root == nil
}
}

extension OrderedSet : ArrayLiteralConvertible {

public init(arrayLiteral elements: T ...) {
for item in elements {
self.insert(item)
}
}
}

extension OrderedSet : Printable, DebugPrintable {

public var description: String {
if self.count == 0 {
return "0 members"
}
return "{" + ", ".join(map(self) { "\(\$0)" }) + "}"
}

public var debugDescription: String {
if self.count == 0 {
return "0 members"
}
return "{" + ", ".join(map(self) { "\(\$0)" }) + "}"
}
}

private class OrderedSetNode<T : Comparable> {

var value: T
var node1, node2: OrderedSetNode<T>?

// used for tree rotation
var weight: Int

init(_ value: T) {
self.value = value
self.weight = 1
}
}

extension OrderedSetNode {

var clone: OrderedSetNode<T> {
let _clone = OrderedSetNode(value)
_clone.node1 = self.node1
_clone.node2 = self.node2
_clone.weight = self.weight
return _clone
}
}

extension OrderedSetNode {

func leftRotate() {

let _tnode = node1
node1 = OrderedSetNode(value)
node1!.node1 = _tnode
node1!.node2 = node2!.node1
node1!.weightCheck()

value = node2!.value
node2 = node2!.node2

}

func rightRotate() {

let _tnode = node2
node2 = OrderedSetNode(value)
node2!.node2 = _tnode
node2!.node1 = node1!.node2
node2!.weightCheck()

value = node1!.value
node1 = node1!.node1

}

func weightCheck() {

if node1 == nil && node2 != nil && node2!.weight > 1 {
leftRotate()
} else if node2 == nil && node1 != nil && node1!.weight > 1 {
rightRotate()
} else if node1 != nil && node2 != nil {
if node1!.weight > node2!.weight * 2 {
rightRotate()
} else if node1!.weight * 2 < node2!.weight {
leftRotate()
}
}

let _w1 = node1?.weight ?? 0
let _w2 = node2?.weight ?? 0
self.weight = _w1 + _w2 + 1
}

func contains(member: T) -> Bool {
if member < value {
return node1?.contains(member) ?? false
}
if value < member {
return node2?.contains(member) ?? false
}
return true
}

subscript (position: Int) -> T! {
let _w1 = node1?.weight ?? 0
if position < _w1 {
return node1?[position]
}
if position == _w1 {
return value
}
return node2?[position - _w1 - 1]
}

func insert(newValue: T) {
if newValue < value {
if isUniquelyReferencedNonObjC(&node1) {
node1!.insert(newValue)
} else if let _node1 = node1 {
node1 = _node1.clone
node1!.insert(newValue)
} else {
node1 = OrderedSetNode(newValue)
}
node1!.weightCheck()
return
}
if value < newValue {
if isUniquelyReferencedNonObjC(&node2) {
node2!.insert(newValue)
} else if let _node2 = node2 {
node2 = _node2.clone
node2!.insert(newValue)
} else {
node2 = OrderedSetNode(newValue)
}
node2!.weightCheck()
return
}
value = newValue
}
}

extension OrderedSetNode {

var view: (OrderedSetView<T>, last: OrderedSetView<T>) {
let _v = OrderedSetView(value)
let _v1 = node1?.view
let _v2 = node2?.view
if _v1 != nil && _v2 != nil {
_v1!.last._next = _v
_v._next = _v2!.0
return (_v1!.0, _v2!.last)
}
if _v1 == nil && _v2 != nil {
_v._next = _v2!.0
return (_v, _v2!.last)
}
if _v1 != nil && _v2 == nil {
_v1!.last._next = _v
return (_v1!.0, _v)
}
return (_v, _v)
}
}

private class OrderedSetView<T> {

var value: T
var _next: OrderedSetView<T>?

init(_ value: T) {
self.value = value
}
}[/code]

darigold 2015-4-3 02:29 PM

Interesting Swift code.

Susan﹏汪汪 2015-4-3 04:19 PM

[quote]原帖由 [i]darigold[/i] 於 2015-4-3 02:29 PM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413342103&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]
Interesting Swift code.

darigold 2015-4-4 12:14 AM

## persistent binary tree

[code]#include <iostream>
#include <vector>
#include <cassert>

using namespace std;

class persistent_tree
{
public:
persistent_tree();
~persistent_tree();
void insert(int x);
void dump(unsigned int time_stamp);
private:
class persistent_tree_node
{
public:
persistent_tree_node(int data, persistent_tree_node* left, persistent_tree_node* right, int count);
~persistent_tree_node();

void release();

// Ideally these should be encapsulated - skipped for illustration
persistent_tree_node* left;
persistent_tree_node* right;
unsigned int count;
int data;
int ref_count;
};

vector<persistent_tree_node*> roots;

persistent_tree_node* recursive_insert(persistent_tree_node* current, int new_data);
void recursive_dump(persistent_tree_node* current);
};

persistent_tree::persistent_tree()
{
}

persistent_tree::~persistent_tree()
{
for (unsigned int i = 0; i < this->roots.size(); i++)
{
this->roots[i]->release();
}
}

persistent_tree::persistent_tree_node::persistent_tree_node(int data, persistent_tree_node* left, persistent_tree_node* right, int count)
{
this->left = left;
this->right = right;
this->data = data;
this->count = 1;

if (this->left != nullptr)
{
}
if (this->right != nullptr)
{
}
}

{
this->ref_count++;
}

void persistent_tree::persistent_tree_node::release()
{
if (--this->ref_count == 0)
{
delete this;
}
}

persistent_tree::persistent_tree_node::~persistent_tree_node()
{
if (this->left != nullptr)
{
this->left->release();
}
if (this->right != nullptr)
{
this->right->release();
}
}

void persistent_tree::insert(int new_data)
{
// Insert always work on the last time stamp
persistent_tree_node* root = nullptr;
if (this->roots.size() != 0)
{
root = this->roots[this->roots.size() - 1];
}

persistent_tree_node* new_root = this->recursive_insert(root, new_data);
this->roots.push_back(new_root);
}

persistent_tree::persistent_tree_node* persistent_tree::recursive_insert(persistent_tree::persistent_tree_node* current, int new_data)
{
if (current == nullptr)
{
return new persistent_tree::persistent_tree_node(new_data, nullptr, nullptr, 1);
}
else if (current->data == new_data)
{
return new persistent_tree::persistent_tree_node(new_data, current->left, current->right, current->count + 1);
}
else if (current->data > new_data)
{
persistent_tree::persistent_tree_node* new_left_node = this->recursive_insert(current->left, new_data);
return new persistent_tree::persistent_tree_node(current->data, new_left_node, current->right, current->count);
}
else if (current->data < new_data)
{
persistent_tree::persistent_tree_node* new_right_node = this->recursive_insert(current->right, new_data);
return new persistent_tree::persistent_tree_node(current->data, current->left, new_right_node, current->count);
}
else
{
assert(false);
return nullptr;
}
}

void persistent_tree::dump(unsigned int time_stamp)
{
if (time_stamp < this->roots.size())
{
persistent_tree::persistent_tree_node* root = this->roots[time_stamp];
this->recursive_dump(root);
cout << endl;
}
else
{
assert(false);
}
}

void persistent_tree::recursive_dump(persistent_tree::persistent_tree_node* current)
{
if (current == nullptr)
{
return;
}
else
{
this->recursive_dump(current->left);
for (unsigned int i = 0; i < current->count; i++)
{
// Extra comma at the end, don't care
cout << current->data << ", ";
}
this->recursive_dump(current->right);
}
}

int main(int argc, char** argv)
{
persistent_tree tree;
tree.insert(3);
tree.insert(0);
tree.insert(6);
tree.insert(2);
tree.insert(4);
tree.dump(0);
tree.dump(1);
tree.dump(2);
tree.dump(3);
tree.dump(4);
return 0;
}[/code]

darigold 2015-4-4 12:21 AM

For simplicity - I implemented only the insert method for a binary tree, and didn't bother to balance it.

1.) This tree is based on immutable nodes, with more careful handling of ref_count (using interlocked increment) and root list (using a lock free queue maybe), we can run this data structure in parallel with no locks.

2) this tree can give caller back all its histories. This can be useful if we want them. For example, when a transaction need to be rollback, or maybe just because we wanted to debug. By releasing the root list selectively, we can choose what time-stamp we wish to get rid of. Of course, we could have achieve the same thing by cloning the whole tree all the time, but that's too expensive. The maintain log(n) time for the insertion (assuming the tree balancing will be there)

darigold 2015-4-4 01:09 AM

Code is pushed to [url]https://github.com/cshung/MiscLab/blob/master/PersistentTreeDemo/Main.cpp[/url]

stupidsing 2015-4-10 06:40 PM

while we are on the topic of persistent trees, I'd like to show you my immutable 2-3 tree (or B-tree) implementation.

[url]https://github.com/stupidsing/suite/blob/master/src/main/java/suite/immutable/I23Tree.java[/url]

This tree implementation is immutable, auto-balanced and supports removal.  Comments are welcome.

darigold 2015-4-11 01:12 AM

[quote]原帖由 [i]stupidsing[/i] 於 2015-4-10 06:40 PM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413962500&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]
while we are on the topic of persistent trees, I'd like to show you my immutable 2-3 tree (or B-tree) implementation.
[/quote]
Nice suite of source code!
I am particularly interested in the c/asm folder. You seems to have some good stuff there - garbage collector, jit code demo, bootloader, ...

[quote]原帖由 [i]darigold[/i] 於 2015-4-4 01:09 AM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413385415&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]
Code is pushed to [url=https://github.com/cshung/MiscLab/blob/master/PersistentTreeDemo/Main.cpp]https://github.com/cshung/MiscLab/blob/master/PersistentTreeDemo/Main.cpp[/url] [/quote]點解你地鐘意用傳統的格式? 而唔直接在個 class 內 detailed 埋 D code? 唔覺得亂及麻煩嗎?:fst_013:

[table][tr][td]persistent_tree::~persistent_tree()[/td][/tr][tr][td]{[/td][/tr][tr][td]    for (unsigned int i = 0; i < this->roots.size(); i++)[/td][/tr][tr][td]    {[/td][/tr][tr][td]        this->roots[i]->release();[/i][/td][/tr][tr][td]    }[/td][/tr][tr][td]}[/td][/tr][/table]

class persistent_tree{
~persistent_tree()
{
for (unsigned int i = 0; i < this->roots.size(); i++)
{
this->roots->release();
}

}
};

Susan﹏汪汪 2015-4-11 01:59 AM

[quote]原帖由 [i]stupidsing[/i] 於 2015-4-10 06:40 PM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413962500&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]
while we are on the topic of persistent trees, I'd like to show you my immutable 2-3 tree (or B-tree) implementation.

[url=https://github.com/stupidsing/suite/blob/master/src/main/java/suite/immutable/I]https://github.com/stupidsing/suite/blob/master/src/main/java/suite/immutable/I[/url] ... [/quote]之前只係簡單試過寫唔影響balance同保持最大COW的情況下嘅remove

darigold 2015-4-11 03:50 AM

:) C# Dictionary 我用得最多。

HashMap據我理解做唔到。

darigold 2015-4-11 03:52 AM

## 唔好.......停!

Harder ones!
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-binary-tree-preorder.html]LeetCode OJ - Binary Tree Preorder Traversal[/url] (Trivial recursive walk)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-binary-tree-inorder.html]LeetCode OJ - Binary Tree Inorder Traversal[/url] (Trivial recursive walk)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-climbing-stairs.html]LeetCode OJ - Climbing Stairs[/url] (Trivial dynamic programming)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-populating-next-right.html]LeetCode OJ - Populating Next Right Pointers in Each Node[/url] (Non trivial traversal order - simple though)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-repeated-dna-sequences.html]LeetCode OJ - Repeated DNA Sequences[/url] (Compact packing)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-valid-parentheses.html]LeetCode OJ - Valid Parentheses[/url] (Pushdown Automata)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-unique-binary-search-trees.html]LeetCode OJ - Unique Binary Search Trees[/url] (Catalan numbers!)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-linked-list-cycle.html]LeetCode OJ - Linked List Cycle[/url] (Floyd Cycle detection)
[url=http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-single-number-ii.html]LeetCode OJ - Single Number II[/url] (Finite field modulo 3)

[[i] 本帖最後由 darigold 於 2015-7-18 05:03 AM 編輯 [/i]]

darigold 2015-4-11 04:04 AM

[quote]原帖由 [i]煙民母親生賤種[/i] 於 2015-4-11 01:26 AM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413992308&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]

darigold 2015-4-11 05:00 AM

[quote]原帖由 [i]darigold[/i] 於 2015-4-11 04:04 AM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413997583&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]

char *x;

char* x;

stupidsing 2015-4-11 08:45 AM

[quote]原帖由 [i]darigold[/i] 於 2015-4-11 01:12 AM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413991494&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]

Nice suite of source code!
I am particularly interested in the c/asm folder. You seems to have some good stuff there - garbage collector, jit code demo, bootloader, ... [/quote]

gc和jit離目標還有萬丈遠吧。

stupidsing 2015-4-11 08:47 AM

[quote]原帖由 [i]darigold[/i] 於 2015-4-11 05:00 AM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413998619&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]

char *x;

char* x; [/quote]

char *x, y, *z;

darigold 2015-4-11 09:25 AM

[quote]原帖由 [i]stupidsing[/i] 於 2015-4-11 08:45 AM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=414007335&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]

gc和jit離目標還有萬丈遠吧。

[quote]原帖由 [i]darigold[/i] 於 2015-4-11 05:00 AM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=413998619&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]

char *x;

char* x; [/quote]:fst_010::fst_010::fst_010:

void mth(){
}

void mth()
{
}

darigold 2015-4-12 09:50 AM

[quote]原帖由  真係唔明點解有人鐘意將粒星寫係variable前面。
[/quote]
[quote]原帖由  於 2015-4-11 01:50 PM 發表 [url=http://computer.discuss.com.hk/redirect.php?goto=findpost&pid=414024969&ptid=24497948][img]http://computer.discuss.com.hk/images/common/back.gif[/img][/url]做咩話我

[/quote]

[[i] 本帖最後由 darigold 於 2017-10-2 04:24 AM 編輯 [/i]]

darigold 2015-4-21 12:45 PM

## 呢條有難度

[url]https://leetcode.com/problems/largest-number/[/url]

greedy唔work, sorting是不成的。12, 121 ->12121   12, 123 -> 12312 冇好辦法order。
brute force太慢。

branch and bound冇小心tune都會TLE。

Susan﹏汪汪 2015-4-21 02:02 PM

[quote]原帖由 [i]darigold[/i] 於 2015-4-21 12:45 PM 發表 [url=http://www.discuss.com.hk/redirect.php?goto=findpost&pid=414856228&ptid=24497948][img]http://www.discuss.com.hk/images/common/back.gif[/img][/url]
https://leetcode.com/problems/largest-number/

greedy唔work, sorting是不成的。12, 121 ->12121   12, 123 -> 12312 冇好辦法order。
brute force太慢。

branch and bound冇小心tune ... [/quote]

[url=http://www.discuss.com.hk/iphone][img=100,23]http://i.discuss.com.hk/d/images/r10/iphoneD.jpg[/img][/url]

darigold 2015-4-21 03:34 PM

[[i] 本帖最後由 darigold 於 2018-4-22 09:52 AM 編輯 [/i]]

darigold 2015-4-22 09:51 PM

## 再黎一條我覺得難既...

[url]http://andrew-algorithm.blogspot.com/2015/04/leetcode-oj-median-of-two-sorted-arrays.html[/url]

darigold 2015-4-23 07:12 AM

## 有冇人想試suffix tree?

[url=https://leetcode.com/problems/longest-palindromic-substring/]https://leetcode.com/problems/longest-palindromic-substring/[/url]

Suffix tree好煩，最終學左Manacher's Algorithm

http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-longest-palindromic.html

[[i] 本帖最後由 darigold 於 2015-7-5 08:42 AM 編輯 [/i]]

darigold 2015-4-24 07:33 AM

MIT 6.851 is awesome!

darigold 2015-6-16 01:33 AM

Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck off.

[url=http://andrew-algorithm.blogspot.com/2015/06/leetcode-oj-invert-binary-tree.html]LeetCode OJ - Invert Binary Tree[/url]

Can't imagine a good programmer don't get this one - this is trivial!

[[i] 本帖最後由 darigold 於 2015-7-15 11:16 PM 編輯 [/i]]

darigold 2015-7-6 11:31 PM

## 復活了!

[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-longest-palindromic.html]LeetCode OJ - Longest Palindromic Substring[/url]
[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-zigzag-conversion.html]LeetCode OJ - ZigZag Conversion[/url]
[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-reverse-integer.html]LeetCode OJ - Reverse Integer[/url]
[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-string-to-integer-atoi.html]LeetCode OJ - String to Integer (atoi)[/url]
[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-binary-tree-right-side-view.html]LeetCode OJ - Binary Tree Right Side View[/url]
[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-palindrome-number.html]LeetCode OJ - Palindrome Number[/url]

45/215

[[i] 本帖最後由 darigold 於 2015-7-15 11:14 PM 編輯 [/i]]

darigold 2015-7-7 11:51 PM

[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-implement-queue-using-stacks.html]LeetCode OJ - Implement Queue using Stacks[/url]
[url=http://andrew-algorithm.blogspot.com/2015/07/leetcode-oj-regular-expression-matching.html]LeetCode OJ - Regular Expression Matching[/url]

[[i] 本帖最後由 darigold 於 2015-7-15 11:15 PM 編輯 [/i]]