💡 LeetCode 70 - Climbing Stairs
문제 You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In howmany distinct ways can you climb to the top? 입출력 예제 ✅ 예제 1 Input: n = 2...
문제 You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In howmany distinct ways can you climb to the top? 입출력 예제 ✅ 예제 1 Input: n = 2...
문제 Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer should be non-negative as well. You must not use any built-in exponent...
문제 Given two binary strings a and b, return their sum as a binary string. 입출력 예제 ✅ 예제 1 Input: a = "11", b = "1" Output: "100" ✅ 예제 2 Input: a = "1010", b = "1011" Output: "10101" 제약조건 ...
문제 You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant ...
문제 Given a string s consisting of words and spaces, return the length of the last word in the string. A word is a maximal substring consisting of non-space characters only. 입출력 예제 ✅ 예제 1 Input...
문제 Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You must write...
문제 Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 입출력 예제 ✅ 예제 1 Input: haystack = "sadbutsad", ...
문제 Given an integer array nums and an integer val, remove all occurrences of val in nums in-place. The order of the elements may be changed. Then return the number of elements in nums which ar...
문제 Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order of the elements should be kept t...
문제 You are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing together the nodes of the first two lists. Re...