xinyu04

导航

2022年7月28日 #

LeetCode 33 Search in Rotated Sorted Array 二分

摘要: There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at a 阅读全文

posted @ 2022-07-28 22:20 Blackzxy 阅读(20) 评论(0) 推荐(0) 编辑

LeetCode 34 Find First and Last Position of Element in Sorted Array lower_bound & upper_bound

摘要: Given an array of integers `nums` sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not foun 阅读全文

posted @ 2022-07-28 16:26 Blackzxy 阅读(10) 评论(0) 推荐(0) 编辑

LeetCode 190 Reverse Bits [classic] 思维

摘要: Reverse bits of a given 32 bits unsigned integer. Input: n = 11111111111111111111111111111101 Output: 3221225471 (10111111111111111111111111111111) Ex 阅读全文

posted @ 2022-07-28 15:00 Blackzxy 阅读(9) 评论(0) 推荐(0) 编辑

LeetCode 103 Binary Tree Zigzag Level Order Traversal 双端队列 Deque

摘要: Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the n 阅读全文

posted @ 2022-07-28 04:26 Blackzxy 阅读(13) 评论(0) 推荐(0) 编辑