摘要: At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door 阅读全文
posted @ 2016-07-26 23:11 琴影 阅读(1036) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = "anagram", t = "nagaram", return true. s = "rat", t 阅读全文
posted @ 2016-07-26 17:56 琴影 阅读(685) 评论(0) 推荐(0) 编辑
摘要: 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 a 阅读全文
posted @ 2016-07-26 17:06 琴影 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. to 题目大意: 翻转一棵二叉树。 测试样例见题目描述。 花絮: 这道题目的灵感来自于Max Howell的推特原文: Google:我们90%的工程师在用你写的软件(Homebrew),但你竟然不会在白板上翻转一棵二叉树,所以滚吧。 解题思路: 递归或者 阅读全文
posted @ 2016-07-26 14:53 琴影 阅读(156) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2016-07-26 14:25 琴影 阅读(165) 评论(0) 推荐(0) 编辑