ほほしのひかるinhikaru.hashnode.dev·Oct 16, 2023 · 5 min readBitwise Operation(LC.136,137,260)136. Single Number Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant extra space. Example 1: Input: nums = ...00
ほほしのひかるinhikaru.hashnode.dev·Oct 12, 2023 · 2 min read167. Two Sum II - Input Array Is SortedGiven a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers[index<sub>1</sub>] and numbers[index<sub>2</sub>] where 1...00
ほほしのひかるinhikaru.hashnode.dev·Oct 12, 2023 · 2 min read92. Reverse Linked List IIGiven 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 position right, and return the reversed list. Example 1: Input: head = [1,2,3,4,5], left = 2, right = 4 O...00