归档 2016年8月

[LeetCode]Longest Absolute File Path

题目描述:

LeetCode 388. Longest Absolute File Path

Suppose we abstract our file system by a string in the following manner:

The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents:

dir
    subdir1
    subdir2
        file.ext

The directory dir ...

继续阅读

[LeetCode]First Unique Character in a String

题目描述:

LeetCode 387. First Unique Character in a String

Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.

Examples:

s = "leetcode"
return 0.

s = "loveleetcode",
return 2.

Note: You ...

继续阅读

[LeetCode]Same Tree

题目描述:

LeetCode 100. Same Tree

Given two binary trees, write a function to check if they are equal or not.

Two binary trees are considered equal if they are structurally identical and the nodes have the same value.

题目大意:

给定两棵二叉树 ...

继续阅读

每日归档

上个月

下个月

归档