上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 37 下一页
摘要: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as: a binary tree in which the dep 阅读全文
posted @ 2018-12-28 10:54 fatttcat 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2018-12-28 09:38 fatttcat 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文
posted @ 2018-12-28 09:07 fatttcat 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2018-12-27 19:00 fatttcat 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Given a node from a cyclic linked list which is sorted in ascending order, write a function to insert a value into the list such that it remains a cyc 阅读全文
posted @ 2018-12-27 18:43 fatttcat 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a (singly) linked list with head node root, write a function to split the linked list into k consecutive linked list "parts". The length of each 阅读全文
posted @ 2018-12-27 16:35 fatttcat 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer represented as non-empty a singly linked list of digits, plus one to the integer. You may assume the integer do not conta 阅读全文
posted @ 2018-12-27 16:14 fatttcat 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list using insertion sort. A graphical example of insertion sort. The partial sorted list (black) initially contains only the first elem 阅读全文
posted @ 2018-12-27 15:57 fatttcat 阅读(135) 评论(0) 推荐(0) 编辑
摘要: We are given head, the head node of a linked list containing unique integer values. We are also given the list G, a subset of the values in the linked 阅读全文
posted @ 2018-12-27 15:15 fatttcat 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, rotate the list to the right by k places, where k is non-negative. Example 1: Example 2: time: O(n), space: O(1) 阅读全文
posted @ 2018-12-27 14:49 fatttcat 阅读(95) 评论(0) 推荐(0) 编辑
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 37 下一页