上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 56 下一页

2021年6月13日

摘要: 题目描述 Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should retu 阅读全文
posted @ 2021-06-13 10:13 朴素贝叶斯 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. /** * Definition for singly-linked 阅读全文
posted @ 2021-06-13 09:15 朴素贝叶斯 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given an array where elements are sorted in ascending order,convert it to a height balanced BST. /** * Definition for binary tree * struct TreeNo 阅读全文
posted @ 2021-06-13 08:12 朴素贝叶斯 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. /** * 阅读全文
posted @ 2021-06-13 07:20 朴素贝叶斯 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. /** * D 阅读全文
posted @ 2021-06-13 06:35 朴素贝叶斯 阅读(18) 评论(0) 推荐(0) 编辑

2021年6月12日

摘要: 题目描述 Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are no 阅读全文
posted @ 2021-06-12 22:36 朴素贝叶斯 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 题目描述 将一个给定字符串根据给定的行数,以从上往下、从左到右进行 Z 字形排列。比如输入字符串为 "LEETCODEISHIRING" 行数为 3 时,排列如下: L C I R E T O E S I I G E D H N 之后,你的输出需要从左往右逐行读取,产生出一个新的字符串,比如:"LC 阅读全文
posted @ 2021-06-12 21:21 朴素贝叶斯 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. /** 阅读全文
posted @ 2021-06-12 20:09 朴素贝叶斯 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k =2,return 4->5->1-> 阅读全文
posted @ 2021-06-12 19:22 朴素贝叶斯 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a linked list, remove the n th node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. Aft 阅读全文
posted @ 2021-06-12 18:05 朴素贝叶斯 阅读(18) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37 38 39 40 41 ··· 56 下一页

导航