上一页 1 2 3 4 5 6 7 8 ··· 13 下一页
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2019-05-12 15:31 GoodRnne 阅读(166) 评论(0) 推荐(0)
摘要: Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identi 阅读全文
posted @ 2019-05-11 20:45 GoodRnne 阅读(187) 评论(0) 推荐(0)
摘要: 并发 在Go语言中较为出名的就是他本身支持高并发机制,通过在程序中使用关键字go 函数名() 来创建一个并发任务单元,然后系统将任务单元放置在系统队列中,等待调度器安排合适系统线程去获取执行权并执行任务单元(就是函数)。在这其中每个任务单元保存了该函数的指针、传入的参数、执行所需的栈内空间大小(2K 阅读全文
posted @ 2019-05-10 20:53 GoodRnne 阅读(167) 评论(0) 推荐(0)
摘要: Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2019-05-09 22:04 GoodRnne 阅读(199) 评论(0) 推荐(0)
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: 阅读全文
posted @ 2019-05-08 20:41 GoodRnne 阅读(352) 评论(0) 推荐(0)
摘要: Given a binary tree, return the inorder traversal of its nodes' values. Example: Follow up: Recursive solution is trivial, could you do it iteratively 阅读全文
posted @ 2019-05-08 20:18 GoodRnne 阅读(405) 评论(0) 推荐(0)
摘要: Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: 阅读全文
posted @ 2019-05-06 10:30 GoodRnne 阅读(170) 评论(0) 推荐(0)
摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文
posted @ 2019-05-05 23:20 GoodRnne 阅读(181) 评论(0) 推荐(0)
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o 阅读全文
posted @ 2019-05-04 16:47 GoodRnne 阅读(236) 评论(0) 推荐(0)
摘要: 在Go语言中没有了class 类关键字,但是这并不代表Go语言不能使用面向对象编程,在Go语言中使用了struct关键和interface 关键字来定义对象和方法接口。具体如下: 面向对象 Go中使用struct来定义类,假如我们需要定义一个person类,其中包含姓名、年龄等信息。我们可以使用st 阅读全文
posted @ 2019-05-04 13:30 GoodRnne 阅读(149) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 13 下一页