Given two strings s and t, return true if they are equal when both are typed into empty text editors. '>Note that after backspacing an empty text, the
You are given an integer array nums and an integer k.In one operation, you can pick two numbers from the array whose sum equals k and remove them from
Design a HashMap without using any built-in hash table libraries.Implement the MyHashMap class:Example 1:InputOutputExplanationConstraints:key의 범위가 최대
Design a HashSet without using any built-in hash table libraries.Implement MyHashSet class:Example 1:InputOutputExplanationConstraints:HashSet을 구현하라는
Implement the BSTIterator class that represents an iterator over the in-order traversal of a binary search tree (BST):Notice that by initializing the
You are keeping score for a baseball game with strange rules. The game consists of several rounds, where the scores of past rounds may affect future r
Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree.Example
Given the root of a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every no
You are given the root of a binary search tree (BST) and an integer val.Find the node in the BST that the node's value equals val and return the subtr
Write a function that reverses a string. The input string is given as an array of characters s.You must do this by modifying the input array in-place
Given a string s of '(' , ')' and lowercase English characters.Your task is to remove the minimum number of parentheses ( '(' or ')', in any positions
Given two integer arrays pushed and popped each with distinct values, return true if this could have been the result of a sequence of push and pop ope
Problem >Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in a Unix-style file system, convert it to
Problem >Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. > An input string is
A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null.Const
Given the head of a linked list, rotate the list to the right by k places.Example 1:Example 2:Constraints:주어진 리스트를 k번만큼 회전시킨 결과를 구하는 문제다.우선 head가 null
Problem >Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. R
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 conta
Given head, the head of a linked list, determine if the linked list has a cycle in it.There is a cycle in a linked list if there is some node in the l
You are given the heads of two sorted linked lists list1 and list2.Merge the two lists in a one sorted list. The list should be made by splicing toget