原创 最新推荐文章于 2026-10-12 13:52:56 发布 2.2k 阅读 AI 写同款· GEO 优化 › 给定整数数组 nums 和目标值 target,在数组中找出和为目标值的两个整数,返回它们的索引。 使用哈希表存储元素值到索引的映射。遍历数组,对于每个元素 num,检查 target - num 是否在哈希 ...
【LeetCode】树的DFS(前序、中序、后序)精选10题 LeetCode 树的DFS(前序、中序、后序)精选10题 详解 阅读详情 Given a linked list, swap every two adjacent nodes and return its head. Given 1->2->3->4, you should return the list as 2->1->4->3.
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is strobogrammatic. The number is represented as a ...
Neetcode 150 is a curated list of 150 LeetCode problems designed to cover all possible patterns & topics in data structures. Mainly practicing in C, C++, Rust, Python ...