Problem Contiguous Array Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1. Example 1: Example 2: Constraints: 1 <= nums.length <= 10⁵ nums[i] is either 0 or 1. Solution JavaScript
Problem 4Sum II Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, 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 4개의 정수 배열 nums1, nums2, nums3, nums4 이 주어지고 모든 배열의 길이는 n 일때 다음과 같은 조건을 충족하는 tuples (i, j, k, l) 의 갯수를 구하시오 (간단히 말하면, 더해서 0이 될 수 있는 경우의 수를 구하시오) Example 1: Example 2: Constraints: `n == nu
Problem Find All Anagrams in a String Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Example 1: Example 2: Constraints: 1 <= s.length, p.length <= 3 * 10⁴ `s
Problem Rotate Array Given an array, rotate the array to the right by k steps, where k is non-negative. 주어진 배열을 k 단계만큼 회전 시키세요. k는 양수 입니다 Example 1: Example 2: Constraints: 1 <= nums.length <= 10⁵ -2³¹ <= nums[i] <= 2³¹ - 1 0 <= k <= 10⁵ Solution JavaScript Feedback은 언제나 환영입니다🤗
Problem Maximum XOR of Two Numbers in an Array Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n. 정주로 이루어진 배열 nums가 주어질 때0 <= i <= j < n. 조건하에 nums[i] XOR nums[j]의 결과중 가장 큰 값을 구하시오. Example 1: Example 2: Constraints: 1 <= nums.length <= 2 * 10⁵ 0 <= nums[i] <= 2³¹ - 1 Solution JavaScript 첫번째 시도 안타깝게도 <span style="co
Problem All Elements in Two Binary Search Trees Given two binary search trees root1 and root2, return a list containing all the integers from both trees sorted in ascending order. 주어진 두 이진 검색 트리 root1, root2의 정수들이 오름차순으로 정렬된 하나의 리스트를 반환하시오 Example 1: Example 2: . 이진트리 root가 주어 졌을 때, 계층의 순서대로 순회하는 값을 구하시오. (좌측부터 우측으로, 계층별로) Example 1: Example 2: Example 3: Constraints: The number of node
Problem Validate Binary Search Tree Given the root of a binary tree, determine if it is a valid binary search tree (BST). 주어진 이진트리가 유효한 지 밝혀내라 A valid BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with keys greater than the node's key. Both the left and right subtrees must also be binary search tre
Problem Longest Substring Without Repeating Characters Given a string s, find the length of the longest substring without repeating characters. 주어진 문자열 s에서 반복되지 않는 가장 긴 문자열의 길이를 구해라 Example 1: Example 2: Example 3: Constraints: 0 <= s.length <= 5 * 104 s consists of English letters, digits, symbols and spaces. Solution JavaScript Feedback은 언제나 환영입니다🤗
Problem Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list. You may assume the two numbers do not contain any leading zero, except the number 0 itself. 양의 정수를 나타내는 비어있지 있지 않은 2개의 링크드 리스트가 주어진다. 숫자는 역순으로 저장되어 있으며, 각 노드는 하나의 숫자를 포함한다. 두 숫자의 합을 링크드 리스트로