본문 바로가기
728x90

Algorithm75

[LeetCode] 65. Valid Number A valid number can be split up into these components (in order): 1. A decimal number or an integer. 2. (Optional) An 'e' or 'E', followed by an integer. A decimal number can be split up into these components (in order): 1. (Optional) A sign character (either '+' or '-'). 2. One of the following formats: 1. One or more digits, followed by a dot '.'. 2. One or more digits, followed by a dot '.', f.. 2024. 1. 23.
[LeetCode] 64. Minimum Path Sum Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time. Example 1: Input: grid = [[1,3,1],[1,5,1],[4,2,1]] Output: 7 Explanation: Because the path 1 → 3 → 1 → 1 → 1 minimizes the sum. Example 2: Input: grid = [[1,2,3],[4,5,6]] Output: 1.. 2024. 1. 14.
[LeetCode] 63. Unique Paths II You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m - 1] n - 1]). The robot can only move either down or right at any point in time. An obstacle and space are marked as 1 or 0 respectively in grid. A path that the robot takes cannot include any square that is an o.. 2024. 1. 12.
[LeetCode] 62. Unique Paths There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m - 1][n - 1]). The robot can only move either down or right at any point in time. Given the two integers m and n, return the number of possible unique paths that the robot can take to reach the bottom-right corner. The test c.. 2024. 1. 12.
728x90