LeetCode(52)
-
[LeetCode/Kotlin]Easy - 219. Contains Duplicate II
Contains Duplicate II - LeetCode Can you solve this real interview question? Contains Duplicate II - Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j)
2023.06.30 -
[LeetCode/Kotlin]Easy - 136. Single Number
Single Number - LeetCode Can you solve this real interview question? 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 leetcode.com 문제 Given a non-empty array of integers nums, every element appears twice except for one. Find that single o..
2023.06.30 -
[LeetCode/Kotlin]Easy - 169. Majority Element
Majority Element - LeetCode Can you solve this real interview question? Majority Element - Given an array nums of size n, return the majority element. The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists leetcode.com 문제 Given an array nums of size n, return the majority element. The majority element is the element that a..
2023.06.30 -
[LeetCode/Kotlin]Easy - 217. Contains Duplicate
문제 Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example 3: Input: nums = [1,1,1,3,3,4,3,2,4,2] Output: true Constraints: 1
2023.06.10 -
[LeetCode/Kotlin]Easy - 66. Plus One
Plus One - LeetCode Can you solve this real interview question? Plus One - 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 in left-to- leetcode.com 문제 You are given a large integer represented as an integer array digits, where each digits[i] is the ith dig..
2023.06.10 -
[LeetCode/Kotlin]Easy - 9. Palindrome Number
Palindrome Number - LeetCode Can you solve this real interview question? Palindrome Number - Given an integer x, return true if x is a palindrome, and false otherwise. Example 1: Input: x = 121 Output: true Explanation: 121 reads as 121 from left to right and from right to left. Ex leetcode.com 문제 Given an integer x, return true if x is a palindrome, and false otherwise. Example 1: Input: x = 12..
2023.06.10