LeetCode/Kotlin | Easy(32)
-
[LeetCode/Kotlin]Easy - 14. Longest Common Prefix
Longest Common Prefix - LeetCode Can you solve this real interview question? Longest Common Prefix - Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Example 1: Input: strs = ["flower","flow" leetcode.com 문제 Write a function to find the longest common prefix string amongst an array of strings. If there..
2023.05.29 -
[LeetCode/Kotlin]Easy - 118. Pascal's Triangle
Pascal's Triangle - LeetCode Can you solve this real interview question? Pascal's Triangle - Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: [https://upload.wikimedia.o leetcode.com 문제 Given an integer numRows, return the first numRows of Pascal's triangle. In Pascal's triangle, e..
2023.05.29 -
[LeetCode/Kotlin]Easy - 938. Range Sum of BST
[LeetCode/Kotlin]Easy - 938. Range Sum of BST Range Sum of BST - LeetCode Can you solve this real interview question? Range Sum of BST - Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high]. Example 1: [https://assets.l leetcode.com 문제 Given the root node of a binary search tree and two in..
2023.05.23 -
[LeetCode/Kotlin]Easy - 70. Climbing Stairs
[LeetCode/Kotlin]Easy - 70. Climbing Stairs Climbing Stairs - LeetCode Can you solve this real interview question? 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 how many distinct ways can you climb to the top? Example 1: Input: n = 2 Outpu leetcode.com 문제 You are climbing a staircase. It takes n steps to reach t..
2023.05.23 -
[LeetCode/Kotlin]Easy - 2016. Maximum Difference Between Increasing Elements
[LeetCode/Kotlin]Easy - 2016. Maximum Difference Between Increasing Elements Maximum Difference Between Increasing Elements - LeetCode Can you solve this real interview question? Maximum Difference Between Increasing Elements - Given a 0-indexed integer array nums of size n, find the maximum difference between nums[i] and nums[j] (i.e., nums[j] - nums[i]), such that 0
2023.05.16 -
[LeetCode/Kotlin]Easy - 404. Sum of Left Leaves
[LeetCode/Kotlin]Easy - 404. Sum of Left Leaves Sum of Left Leaves - LeetCode Can you solve this real interview question? Sum of Left Leaves - Given the root of a binary tree, return the sum of all left leaves. A leaf is a node with no children. A left leaf is a leaf that is the left child of another node. Example 1: [https://ass leetcode.com 문제 Given the root of a binary tree, return the sum of..
2023.05.15