01 2022 档案

摘要:Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (F 阅读全文

posted @ 2022-01-19 11:55 codingEskimo 阅读(52) 评论(0) 推荐(0)

摘要:mplement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek 阅读全文

posted @ 2022-01-17 06:56 codingEskimo 阅读(32) 评论(0) 推荐(0)

摘要:Implement a last-in-first-out (LIFO) stack using only two queues. The implemented stack should support all the functions of a normal stack (push, top, 阅读全文

posted @ 2022-01-17 06:18 codingEskimo 阅读(18) 评论(0) 推荐(0)

摘要:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: MinStack() initializes 阅读全文

posted @ 2022-01-16 08:04 codingEskimo 阅读(48) 评论(0) 推荐(0)

摘要:Given the head of a singly linked list and two integers left and right where left ⇐ right, reverse the nodes of the list from position left to positio 阅读全文

posted @ 2022-01-12 05:57 codingEskimo 阅读(48) 评论(0) 推荐(0)

摘要:Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head. Example 阅读全文

posted @ 2022-01-12 04:04 codingEskimo 阅读(39) 评论(0) 推荐(0)

摘要:Given the root of a binary tree and an integer targetSum, return all root-to-leaf paths where the sum of the node values in the path equals targetSum. 阅读全文

posted @ 2022-01-09 02:04 codingEskimo 阅读(33) 评论(0) 推荐(0)

摘要:Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the 阅读全文

posted @ 2022-01-09 01:49 codingEskimo 阅读(35) 评论(0) 推荐(0)

摘要:Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree of a node co 阅读全文

posted @ 2022-01-09 01:38 codingEskimo 阅读(31) 评论(0) 推荐(0)

摘要: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 lef 阅读全文

posted @ 2022-01-09 01:13 codingEskimo 阅读(38) 评论(0) 推荐(0)

摘要:Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Example1: Input: r 阅读全文

posted @ 2022-01-05 07:48 codingEskimo 阅读(32) 评论(0) 推荐(0)

导航