算法
迈际
这个作者很懒,什么都没留下…
展开
-
199. Binary Tree Right Side View
199.Binary Tree Right Side View Medium 3852206Add to ListShare Given therootof a binary tree, imagine yourself standing on theright sideof it, returnthe values of the nodes you can see ordered from top to bottom. Example 1: Input: root = [...原创 2021-05-05 16:30:32 · 85 阅读 · 0 评论 -
24. Swap Nodes in Pairs
24.Swap Nodes in Pairs Medium 3591208Add to ListShare Given alinked list, swap every two adjacent nodes and return its head. Example 1: Input: head = [1,2,3,4] Output: [2,1,4,3] Example 2: Input: head = [] Output: [] Example 3: Input: h...原创 2021-05-04 11:14:34 · 85 阅读 · 0 评论 -
454. 4Sum II
Given four integer arraysnums1,nums2,nums3, andnums4all of lengthn, return the number of tuples(i, j, k, l)such that: 0 <= i, j, k, l < n nums1[i] + nums2[j] + nums3[k] + nums4[l] == 0 Example 1: Input: nums1 = [1,2], nums2 = [-2,-1], ...原创 2021-05-03 09:52:12 · 84 阅读 · 0 评论 -
leetcode1. Two Sum
1.Two Sum Easy 20038704Add to ListShare Given an array of integersnumsand an integertarget, returnindices of the two numbers such that they add up totarget. You may assume that each input would haveexactlyone solution, and you may not use thes...原创 2021-03-29 20:09:34 · 76 阅读 · 0 评论