LeetCode/Kotlin | Easy(32)
-
[LeetCode/Kotlin]Easy - 392. Is Subsequence
Is Subsequence - LeetCode Can you solve this real interview question? Is Subsequence - Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequence of a string is a new string that is formed from the original string by deleting some (can be n leetcode.com 문제 Given two strings s and t, return true if s is a subsequence of t, or false otherwise. A subsequenc..
2023.07.07 -
[LeetCode/Kotlin]Easy - 58. Length of Last Word
Length of Last Word - LeetCode Can you solve this real interview question? Length of Last Word - 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. Example 1: Input: leetcode.com 문제 Given a string s consisting of words and spaces, return the length of the last word in the string..
2023.06.30 -
[LeetCode/Kotlin]Easy - 1356. Sort Integers by The Number of 1 Bits
Sort Integers by The Number of 1 Bits - LeetCode Can you solve this real interview question? Sort Integers by The Number of 1 Bits - You are given an integer array arr. Sort the integers in the array in ascending order by the number of 1's in their binary representation and in case of two or more integ leetcode.com 문제 You are given an integer array arr. Sort the integers in the array in ascendin..
2023.06.30 -
[LeetCode/Kotlin]Easy - 28. Find the Index of the First Occurrence in a String
Find the Index of the First Occurrence in a String - LeetCode Can you solve this real interview question? Find the Index of the First Occurrence in a String - 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. Example 1: I leetcode.com 문제 Given two strings needle and haystack, return the index of the fir..
2023.06.30 -
[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