自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(72)
  • 收藏
  • 关注

原创 Web3游戏行业报告

事实证明,区块链游戏的金融化在吸引玩家方面非常有效。即便如此,区块链游戏专业人士仍然认为区块链游戏的最大好处是资产所有权,这很重要,因为它为真正的数字财产权奠定了基础,使玩家能够跨平台和生态系统保留、交易和货币化他们的游戏内资产。而在游戏层面该报告指出,gamefi游戏的引导和糟糕的用户体验 (UX) 仍然是最大的挑战,其次是玩家不能玩家理解gamefi游戏的相关概念和游玩体验不佳。而对于该行业最主要的负面影响包括有,加密行业的不景气,禁止 NFT 的传统游戏/平台,宏观经济事件,安全和威胁防护,监管。

2025-03-18 21:51:38 1173

原创 Task Scheduler

You are given an array of CPU , each represented by letters A to Z, and a cooling time, . Each cycle or interval allows the completion of one task. Tasks can be completed in any order, but there's a constraint: identical tasks must be separated by at least

2024-03-08 23:54:41 750

原创 K Closest Points to Origin

Given an array of where represents a point on the X-Y plane and an integer , return the closest points to the origin .The distance between two points on the X-Y plane is the Euclidean distance (i.e., ).You may return the answer in any order. The answer

2024-02-16 18:48:12 727

原创 Last Stone Weight

You are given an array of integers where is the weight of the stone.We are playing a game with the stones. On each turn, we choose the heaviest two stones and smash them together. Suppose the heaviest two stones have weights and with . The result of t

2024-02-16 18:18:03 608

原创 Kth Largest Element in a Stream

Design a class to find the largest element in a stream. Note that it is the largest element in the sorted order, not the distinct element.Implement class:Example 1:Input["KthLargest", "add", "add", "add", "add", "add"][[3, [4, 5, 8, 2]], [3], [5], [

2024-02-06 14:42:15 688

原创 N-Queens

The n-queens puzzle is the problem of placing queens on an chessboard such that no two queens attack each other.Given an integer , return all distinct solutions to the n-queens puzzle. You may return the answer in any order.Each solution contains a disti

2024-02-05 21:58:25 920

原创 Letter Combinations of a Phone Number

2-9[]

2024-02-04 22:35:52 961

原创 Palindrome Partitioning

Given a string , partition such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of .Example 1:Input: s = "aab"Output: [["a","a","b"],["aa","b"]]Example 2:Input: s = "a"Output: [["a"]]IntuitionT

2024-02-03 22:24:40 480

原创 Word Search

Given an grid of characters and a string , return if exists in the grid.The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more

2024-02-03 21:21:11 2133

原创 Combination Sum II

Given a collection of candidate numbers () and a target number (), find all unique combinations in where the candidate numbers sum to .Each number in may only be used once in the combination.Note: The solution set must not contain duplicate combinations.

2024-02-03 19:07:43 632

原创 Subsets II

Given an integer array that may contain duplicates, return all possible subsets (the power set).The solution set must not contain duplicate subsets. Return the solution in any order.Example 1:Input: nums = [1,2,2]Output: [[],[1],[1,2],[1,2,2],[2],[2,2]]

2024-02-02 23:59:25 758

原创 Permutations

Given an array of distinct integers, return all the possible permutations. You can return the answer in any order.Example 1:Input: nums = [1,2,3]Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]Example 2:Input: nums = [0,1]Output: [[0,1],[1

2024-02-02 16:30:54 333

原创 Combination Sum

Given an array of distinct integers and a target integer , return a list of all unique combinations of where the chosen numbers sum to . You may return the combinations in any order.The same number may be chosen from an unlimited number of times. Two co

2024-02-01 00:04:06 558

原创 Subsets

Given an integer array of unique elements, return all possible subsets (the power set).The solution set must not contain duplicate subsets. Return the solution in any order.Example 1:Input: nums = [1,2,3]Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]

2024-01-31 15:49:46 823

原创 Word Search II

Given an of characters and a list of strings , return all words on the board.Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used

2024-01-31 13:44:29 970

原创 Implement Trie (Prefix Tree)

A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various applications of this data structure, such as autocomplete and spellchecker.Implement the Trie class:

2024-01-24 15:48:45 438

原创 Implement Trie (Prefix Tree)

A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various applications of this data structure, such as autocomplete and spellchecker.Implement the Trie class:

2024-01-23 10:35:43 1323

原创 Serialize and Deserialize Binary Tree

Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another computer env

2024-01-22 19:51:02 360

原创 Construct Binary Tree from Preorder and Inorder Traversal

Given two integer arrays and where is the preorder traversal of a binary tree and is the inorder traversal of the same tree, construct and return the binary tree.Example 1:Input: preorder = [3,9,20,15,7], inorder = [9,3,15,20,7]Output: [3,9,20,null,n

2023-12-31 19:07:34 926

原创 Kth Smallest Element in a BST

Given the of a binary search tree, and an integer , return the smallest value (1-indexed) of all the values of the nodes in the tree.Example 1:Input: root = [3,1,4,null,2], k = 1Output: 1Example 2:Input: root = [5,3,6,2,4,null,null,1], k = 3Output

2023-12-27 00:23:29 431

原创 Validate Binary Search Tree

Given the of a binary tree, determine if it is a valid binary search tree (BST).A valid BST is defined as follows:subtreeExample 1:Input: root = [2,1,3]Output: trueExample 2:Input: root = [5,1,4,null,null,3,6]Output: falseExplanation: The root nod

2023-12-26 00:04:33 741

原创 Diameter of Binary Tree

Given the of a binary tree, return the length of the diameter of the tree.The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the .The length of a path between two nodes is

2023-12-25 01:51:01 1017

原创 Binary Tree Right Side View

Given the of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.Example 1:Input: root = [1,2,3,null,5,null,4]Output: [1,3,4]Example 2:Input: root = [1,null,3]Outpu

2023-12-25 01:15:07 1042

原创 Binary Tree Level Order Traversal

Given the of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).Example 1:Input: root = [3,9,20,null,null,15,7]Output: [[3],[9,20],[15,7]]Example 2:Input: root = [1]Output: [[1]]Examp

2023-12-24 02:03:05 782

原创 Lowest Common Ancestor of a Binary Search Tree

Given a binary search tree (BST), find the lowest common ancestor (LCA) node of two given nodes in the BST.According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes and as the lowest node in that has both

2023-12-24 00:59:52 874

原创 Subtree of Another Tree

Given the roots of two binary trees and , return if there is a subtree of with the same structure and node values of and otherwise.A subtree of a binary tree is a tree that consists of a node in and all of this node's descendants. The tree could als

2023-12-23 17:11:30 808

原创 Same Tree

Given the roots of two binary trees and , write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical, and the nodes have the same value.Example 1:Input: p = [1,2,3], q = [1,2,3]Outpu

2023-12-17 14:58:40 894

原创 Diameter of Binary Tree

Given a binary tree, determine if it is height-balanced.Example 1:Input: root = [3,9,20,null,null,15,7]Output: trueExample 2:Input: root = [1,2,2,3,3,null,null,4,4]Output: falseExample 3:Input: root = []Output: trueIntuitionThe problem is to

2023-12-16 00:04:30 775

原创 Diameter of Binary Tree

Given the of a binary tree, return the length of the diameter of the tree.The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the .The length of a path between two nodes is

2023-12-13 19:35:12 884

原创 Maximum Depth of Binary Tree

Given the of a binary tree, return its maximum depth.A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Example 1:Input: root = [3,9,20,null,null,15,7]Output: 3Example 2:Inpu

2023-12-13 18:13:43 784

原创 Invert Binary Tree

Given the of a binary tree, invert the tree, and return its root.Example 1:Input: root = [4,2,7,1,3,6,9]Output: [4,7,2,9,6,3,1]IntuitionThe problem requires inverting a binary tree, which means swapping the left and right subtrees for each node. Thi

2023-12-10 17:50:16 909

原创 Reverse Nodes in k-Group

Given the of a linked list, reverse the nodes of the list at a time, and return the modified list. is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is not a multiple of then left-out nodes, in the

2023-12-10 16:42:43 994

原创 Merge k Sorted Lists

You are given an array of linked-lists , each linked-list is sorted in ascending order.Merge all the linked-lists into one sorted linked-list and return it.Example 1:Input: lists = [[1,4,5],[1,3,4],[2,6]]Output: [1,1,2,3,4,4,5,6]Explanation: The linked

2023-12-09 19:34:11 982

原创 LRU Cache

Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.Implement the class:The functions and must each run in average time complexity.Example 1:Input["LRUCache", "put", "put", "get", "put", "get", "put", "get", "get

2023-12-09 18:19:23 908

原创 Find the Duplicate Number

Given an array of integers containing integers where each integer is in the range inclusive.There is only one repeated number in , return this repeated number.You must solve the problem without modifying the array and uses only constant extra space.Exa

2023-12-08 18:54:42 369

原创 Linked List Cycle

Given , the head of a linked list, determine if the linked list has a cycle in it.There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the pointer. Internally, is used to denote the index

2023-12-08 17:11:45 956

原创 Add Two Numbers

7,0,8]

2023-12-07 18:49:18 909

原创 Copy List with Random Pointer

A linked list of length is given such that each node contains an additional random pointer, which could point to any node in the list, or .Construct a deep copy of the list. The deep copy should consist of exactly brand new nodes, where each new node has

2023-12-07 17:06:33 1533

原创 Remove Nth Node From End of List

Given the of a linked list, remove the node from the end of the list and return its head.The problem involves removing the nth node from the end of a linked list. The approach is to find the length of the linked list, then traverse the list again to find

2023-12-07 16:17:37 403

原创 Reorder List

【代码】Reorder List。

2023-12-07 15:46:29 383

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除