algorithm

module
v0.0.0-...-a94f1ba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2024 License: BSD-3-Clause

Directories

Path Synopsis
* @lc app=leetcode id=1005 lang=golang * * [1005] Maximize Sum Of Array After K Negations * * https://leetcode.com/problems/maximize-sum-of-array-after-k-negations/description/ * * algorithms * Easy (50.74%) * Likes: 234 * Dislikes: 29 * Total Accepted: 20.8K * Total Submissions: 41K * Testcase Example: '[4,2,3]\n1' * * Given an array A of integers, we must modify the array in the following way: * we choose an i and replace A[i] with -A[i], and we repeat this process K * times in total. (We may choose the same index i multiple times.) * * Return the largest possible sum of the array after modifying it in this * way.
* @lc app=leetcode id=1005 lang=golang * * [1005] Maximize Sum Of Array After K Negations * * https://leetcode.com/problems/maximize-sum-of-array-after-k-negations/description/ * * algorithms * Easy (50.74%) * Likes: 234 * Dislikes: 29 * Total Accepted: 20.8K * Total Submissions: 41K * Testcase Example: '[4,2,3]\n1' * * Given an array A of integers, we must modify the array in the following way: * we choose an i and replace A[i] with -A[i], and we repeat this process K * times in total. (We may choose the same index i multiple times.) * * Return the largest possible sum of the array after modifying it in this * way.
* @lc app=leetcode id=1185 lang=golang * * [1185] Day of the Week * * https://leetcode.com/problems/day-of-the-week/description/ * * algorithms * Easy (64.33%) * Likes: 58 * Dislikes: 686 * Total Accepted: 14.4K * Total Submissions: 22.3K * Testcase Example: '31\n8\n2019' * * Given a date, return the corresponding day of the week for that date.
* @lc app=leetcode id=1185 lang=golang * * [1185] Day of the Week * * https://leetcode.com/problems/day-of-the-week/description/ * * algorithms * Easy (64.33%) * Likes: 58 * Dislikes: 686 * Total Accepted: 14.4K * Total Submissions: 22.3K * Testcase Example: '31\n8\n2019' * * Given a date, return the corresponding day of the week for that date.
* @lc app=leetcode id=1262 lang=golang * * [1262] Greatest Sum Divisible by Three * * https://leetcode.com/problems/greatest-sum-divisible-by-three/description/ * * algorithms * Medium (43.02%) * Likes: 246 * Dislikes: 7 * Total Accepted: 8.3K * Total Submissions: 19.2K * Testcase Example: '[3,6,5,1,8]' * * Given an array nums of integers, we need to find the maximum possible sum of * elements of the array such that it is divisible by three.
* @lc app=leetcode id=1262 lang=golang * * [1262] Greatest Sum Divisible by Three * * https://leetcode.com/problems/greatest-sum-divisible-by-three/description/ * * algorithms * Medium (43.02%) * Likes: 246 * Dislikes: 7 * Total Accepted: 8.3K * Total Submissions: 19.2K * Testcase Example: '[3,6,5,1,8]' * * Given an array nums of integers, we need to find the maximum possible sum of * elements of the array such that it is divisible by three.
* @lc app=leetcode id=1329 lang=golang * * [1329] Sort the Matrix Diagonally * * https://leetcode.com/problems/sort-the-matrix-diagonally/description/ * * algorithms * Medium (78.01%) * Likes: 95 * Dislikes: 34 * Total Accepted: 5.8K * Total Submissions: 7.4K * Testcase Example: '[[3,3,1,1],[2,2,1,2],[1,1,1,2]]' * * Given a m * n matrix mat of integers, sort it diagonally in ascending order * from the top-left to the bottom-right then return the sorted array.
* @lc app=leetcode id=1329 lang=golang * * [1329] Sort the Matrix Diagonally * * https://leetcode.com/problems/sort-the-matrix-diagonally/description/ * * algorithms * Medium (78.01%) * Likes: 95 * Dislikes: 34 * Total Accepted: 5.8K * Total Submissions: 7.4K * Testcase Example: '[[3,3,1,1],[2,2,1,2],[1,1,1,2]]' * * Given a m * n matrix mat of integers, sort it diagonally in ascending order * from the top-left to the bottom-right then return the sorted array.
* @lc app=leetcode id=15 lang=golang * * [15] 3Sum * * https://leetcode.com/problems/3sum/description/ * * algorithms * Medium (25.68%) * Likes: 5696 * Dislikes: 690 * Total Accepted: 787.3K * Total Submissions: 3.1M * Testcase Example: '[-1,0,1,2,-1,-4]' * * Given an array nums of n integers, are there elements a, b, c in nums such * that a + b + c = 0? Find all unique triplets in the array which gives the * sum of zero.
* @lc app=leetcode id=15 lang=golang * * [15] 3Sum * * https://leetcode.com/problems/3sum/description/ * * algorithms * Medium (25.68%) * Likes: 5696 * Dislikes: 690 * Total Accepted: 787.3K * Total Submissions: 3.1M * Testcase Example: '[-1,0,1,2,-1,-4]' * * Given an array nums of n integers, are there elements a, b, c in nums such * that a + b + c = 0? Find all unique triplets in the array which gives the * sum of zero.
* @lc app=leetcode id=16 lang=golang * * [16] 3Sum Closest * * https://leetcode.com/problems/3sum-closest/description/ * * algorithms * Medium (45.71%) * Likes: 1664 * Dislikes: 120 * Total Accepted: 426.6K * Total Submissions: 933K * Testcase Example: '[-1,2,1,-4]\n1' * * Given an array nums of n integers and an integer target, find three integers * in nums such that the sum is closest to target.
* @lc app=leetcode id=16 lang=golang * * [16] 3Sum Closest * * https://leetcode.com/problems/3sum-closest/description/ * * algorithms * Medium (45.71%) * Likes: 1664 * Dislikes: 120 * Total Accepted: 426.6K * Total Submissions: 933K * Testcase Example: '[-1,2,1,-4]\n1' * * Given an array nums of n integers and an integer target, find three integers * in nums such that the sum is closest to target.
* @lc app=leetcode id=168 lang=golang * * [168] Excel Sheet Column Title * * https://leetcode.com/problems/excel-sheet-column-title/description/ * * algorithms * Easy (29.58%) * Likes: 826 * Dislikes: 168 * Total Accepted: 185.1K * Total Submissions: 625.8K * Testcase Example: '1' * * Given a positive integer, return its corresponding column title as appear in * an Excel sheet.
* @lc app=leetcode id=168 lang=golang * * [168] Excel Sheet Column Title * * https://leetcode.com/problems/excel-sheet-column-title/description/ * * algorithms * Easy (29.58%) * Likes: 826 * Dislikes: 168 * Total Accepted: 185.1K * Total Submissions: 625.8K * Testcase Example: '1' * * Given a positive integer, return its corresponding column title as appear in * an Excel sheet.
* @lc app=leetcode id=18 lang=golang * * [18] 4Sum * * https://leetcode.com/problems/4sum/description/ * * algorithms * Medium (32.46%) * Likes: 1544 * Dislikes: 290 * Total Accepted: 298.7K * Total Submissions: 917.2K * Testcase Example: '[1,0,-1,0,-2,2]\n0' * * Given an array nums of n integers and an integer target, are there elements * a, b, c, and d in nums such that a + b + c + d = target? Find all unique * quadruplets in the array which gives the sum of target.
* @lc app=leetcode id=18 lang=golang * * [18] 4Sum * * https://leetcode.com/problems/4sum/description/ * * algorithms * Medium (32.46%) * Likes: 1544 * Dislikes: 290 * Total Accepted: 298.7K * Total Submissions: 917.2K * Testcase Example: '[1,0,-1,0,-2,2]\n0' * * Given an array nums of n integers and an integer target, are there elements * a, b, c, and d in nums such that a + b + c + d = target? Find all unique * quadruplets in the array which gives the sum of target.
* @lc app=leetcode id=26 lang=golang * * [26] Remove Duplicates from Sorted Array * * https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/ * * algorithms * Easy (43.29%) * Likes: 2123 * Dislikes: 4492 * Total Accepted: 833.3K * Total Submissions: 1.9M * Testcase Example: '[1,1,2]' * * Given a sorted array nums, remove the duplicates in-place such that each * element appear only once and return the new length.
* @lc app=leetcode id=26 lang=golang * * [26] Remove Duplicates from Sorted Array * * https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/ * * algorithms * Easy (43.29%) * Likes: 2123 * Dislikes: 4492 * Total Accepted: 833.3K * Total Submissions: 1.9M * Testcase Example: '[1,1,2]' * * Given a sorted array nums, remove the duplicates in-place such that each * element appear only once and return the new length.
* @lc app=leetcode id=27 lang=golang * * [27] Remove Element * * https://leetcode.com/problems/remove-element/description/ * * algorithms * Easy (46.81%) * Likes: 1171 * Dislikes: 2397 * Total Accepted: 539.7K * Total Submissions: 1.1M * Testcase Example: '[3,2,2,3]\n3' * * Given an array nums and a value val, remove all instances of that value * in-place and return the new length.
* @lc app=leetcode id=27 lang=golang * * [27] Remove Element * * https://leetcode.com/problems/remove-element/description/ * * algorithms * Easy (46.81%) * Likes: 1171 * Dislikes: 2397 * Total Accepted: 539.7K * Total Submissions: 1.1M * Testcase Example: '[3,2,2,3]\n3' * * Given an array nums and a value val, remove all instances of that value * in-place and return the new length.
* @lc app=leetcode id=31 lang=golang * * [31] Next Permutation * * https://leetcode.com/problems/next-permutation/description/ * * algorithms * Medium (31.76%) * Likes: 2786 * Dislikes: 964 * Total Accepted: 324.6K * Total Submissions: 1M * Testcase Example: '[1,2,3]' * * Implement next permutation, which rearranges numbers into the * lexicographically next greater permutation of numbers.
* @lc app=leetcode id=31 lang=golang * * [31] Next Permutation * * https://leetcode.com/problems/next-permutation/description/ * * algorithms * Medium (31.76%) * Likes: 2786 * Dislikes: 964 * Total Accepted: 324.6K * Total Submissions: 1M * Testcase Example: '[1,2,3]' * * Implement next permutation, which rearranges numbers into the * lexicographically next greater permutation of numbers.
* @lc app=leetcode id=312 lang=golang * * [312] Burst Balloons * * https://leetcode.com/problems/burst-balloons/description/ * * algorithms * Hard (50.66%) * Likes: 2116 * Dislikes: 58 * Total Accepted: 90.1K * Total Submissions: 177.9K * Testcase Example: '[3,1,5,8]' * * Given n balloons, indexed from 0 to n-1.
* @lc app=leetcode id=312 lang=golang * * [312] Burst Balloons * * https://leetcode.com/problems/burst-balloons/description/ * * algorithms * Hard (50.66%) * Likes: 2116 * Dislikes: 58 * Total Accepted: 90.1K * Total Submissions: 177.9K * Testcase Example: '[3,1,5,8]' * * Given n balloons, indexed from 0 to n-1.
* @lc app=leetcode id=33 lang=golang * * [33] Search in Rotated Sorted Array * * https://leetcode.com/problems/search-in-rotated-sorted-array/description/ * * algorithms * Medium (33.59%) * Likes: 3892 * Dislikes: 407 * Total Accepted: 590K * Total Submissions: 1.8M * Testcase Example: '[4,5,6,7,0,1,2]\n0' * * Suppose an array sorted in ascending order is rotated at some pivot unknown * to you beforehand.
* @lc app=leetcode id=33 lang=golang * * [33] Search in Rotated Sorted Array * * https://leetcode.com/problems/search-in-rotated-sorted-array/description/ * * algorithms * Medium (33.59%) * Likes: 3892 * Dislikes: 407 * Total Accepted: 590K * Total Submissions: 1.8M * Testcase Example: '[4,5,6,7,0,1,2]\n0' * * Suppose an array sorted in ascending order is rotated at some pivot unknown * to you beforehand.
* @lc app=leetcode id=34 lang=golang * * [34] Find First and Last Position of Element in Sorted Array * * https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/description/ * * algorithms * Medium (35.03%) * Likes: 2717 * Dislikes: 122 * Total Accepted: 433.5K * Total Submissions: 1.2M * Testcase Example: '[5,7,7,8,8,10]\n8' * * Given an array of integers nums sorted in ascending order, find the starting * and ending position of a given target value.
* @lc app=leetcode id=34 lang=golang * * [34] Find First and Last Position of Element in Sorted Array * * https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/description/ * * algorithms * Medium (35.03%) * Likes: 2717 * Dislikes: 122 * Total Accepted: 433.5K * Total Submissions: 1.2M * Testcase Example: '[5,7,7,8,8,10]\n8' * * Given an array of integers nums sorted in ascending order, find the starting * and ending position of a given target value.
* @lc app=leetcode id=35 lang=golang * * [35] Search Insert Position * * https://leetcode.com/problems/search-insert-position/description/ * * algorithms * Easy (41.44%) * Likes: 1880 * Dislikes: 225 * Total Accepted: 532.5K * Total Submissions: 1.3M * Testcase Example: '[1,3,5,6]\n5' * * Given a sorted array and a target value, return the index if the target is * found.
* @lc app=leetcode id=35 lang=golang * * [35] Search Insert Position * * https://leetcode.com/problems/search-insert-position/description/ * * algorithms * Easy (41.44%) * Likes: 1880 * Dislikes: 225 * Total Accepted: 532.5K * Total Submissions: 1.3M * Testcase Example: '[1,3,5,6]\n5' * * Given a sorted array and a target value, return the index if the target is * found.
* @lc app=leetcode id=386 lang=golang * * [386] Lexicographical Numbers * * https://leetcode.com/problems/lexicographical-numbers/description/ * * algorithms * Medium (49.48%) * Likes: 492 * Dislikes: 66 * Total Accepted: 48.9K * Total Submissions: 98.8K * Testcase Example: '13' * * Given an integer n, return 1 - n in lexicographical order.
* @lc app=leetcode id=386 lang=golang * * [386] Lexicographical Numbers * * https://leetcode.com/problems/lexicographical-numbers/description/ * * algorithms * Medium (49.48%) * Likes: 492 * Dislikes: 66 * Total Accepted: 48.9K * Total Submissions: 98.8K * Testcase Example: '13' * * Given an integer n, return 1 - n in lexicographical order.
* @lc app=leetcode id=39 lang=golang * * [39] Combination Sum * * https://leetcode.com/problems/combination-sum/description/ * * algorithms * Medium (53.12%) * Likes: 3110 * Dislikes: 97 * Total Accepted: 476K * Total Submissions: 887.9K * Testcase Example: '[2,3,6,7]\n7' * * Given a set of candidate numbers (candidates) (without duplicates) and a * target number (target), find all unique combinations in candidates where the * candidate numbers sums to target.
* @lc app=leetcode id=39 lang=golang * * [39] Combination Sum * * https://leetcode.com/problems/combination-sum/description/ * * algorithms * Medium (53.12%) * Likes: 3110 * Dislikes: 97 * Total Accepted: 476K * Total Submissions: 887.9K * Testcase Example: '[2,3,6,7]\n7' * * Given a set of candidate numbers (candidates) (without duplicates) and a * target number (target), find all unique combinations in candidates where the * candidate numbers sums to target.
* @lc app=leetcode id=398 lang=golang * * [398] Random Pick Index * * https://leetcode.com/problems/random-pick-index/description/ * * algorithms * Medium (53.02%) * Likes: 354 * Dislikes: 564 * Total Accepted: 70.4K * Total Submissions: 132.7K * Testcase Example: '["Solution","pick"]\n[[[1,2,3,3,3]],[3]]' * * Given an array of integers with possible duplicates, randomly output the * index of a given target number.
* @lc app=leetcode id=398 lang=golang * * [398] Random Pick Index * * https://leetcode.com/problems/random-pick-index/description/ * * algorithms * Medium (53.02%) * Likes: 354 * Dislikes: 564 * Total Accepted: 70.4K * Total Submissions: 132.7K * Testcase Example: '["Solution","pick"]\n[[[1,2,3,3,3]],[3]]' * * Given an array of integers with possible duplicates, randomly output the * index of a given target number.
* @lc app=leetcode id=40 lang=golang * * [40] Combination Sum II * * https://leetcode.com/problems/combination-sum-ii/description/ * * algorithms * Medium (45.48%) * Likes: 1384 * Dislikes: 55 * Total Accepted: 291.9K * Total Submissions: 636.2K * Testcase Example: '[10,1,2,7,6,1,5]\n8' * * Given a collection of candidate numbers (candidates) and a target number * (target), find all unique combinations in candidates where the candidate * numbers sums to target.
* @lc app=leetcode id=40 lang=golang * * [40] Combination Sum II * * https://leetcode.com/problems/combination-sum-ii/description/ * * algorithms * Medium (45.48%) * Likes: 1384 * Dislikes: 55 * Total Accepted: 291.9K * Total Submissions: 636.2K * Testcase Example: '[10,1,2,7,6,1,5]\n8' * * Given a collection of candidate numbers (candidates) and a target number * (target), find all unique combinations in candidates where the candidate * numbers sums to target.
* @lc app=leetcode id=400 lang=golang * * [400] Nth Digit * * https://leetcode.com/problems/nth-digit/description/ * * algorithms * Medium (30.99%) * Likes: 310 * Dislikes: 951 * Total Accepted: 53.8K * Total Submissions: 173.6K * Testcase Example: '3' * * Find the n^th digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, * 9, 10, 11, ...
* @lc app=leetcode id=400 lang=golang * * [400] Nth Digit * * https://leetcode.com/problems/nth-digit/description/ * * algorithms * Medium (30.99%) * Likes: 310 * Dislikes: 951 * Total Accepted: 53.8K * Total Submissions: 173.6K * Testcase Example: '3' * * Find the n^th digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, * 9, 10, 11, ...
* @lc app=leetcode id=41 lang=golang * * [41] First Missing Positive * * https://leetcode.com/problems/first-missing-positive/description/ * * algorithms * Hard (30.73%) * Likes: 2759 * Dislikes: 730 * Total Accepted: 293.6K * Total Submissions: 949.7K * Testcase Example: '[1,2,0]' * * Given an unsorted integer array, find the smallest missing positive * integer.
* @lc app=leetcode id=41 lang=golang * * [41] First Missing Positive * * https://leetcode.com/problems/first-missing-positive/description/ * * algorithms * Hard (30.73%) * Likes: 2759 * Dislikes: 730 * Total Accepted: 293.6K * Total Submissions: 949.7K * Testcase Example: '[1,2,0]' * * Given an unsorted integer array, find the smallest missing positive * integer.
* @lc app=leetcode id=42 lang=golang * * [42] Trapping Rain Water * * https://leetcode.com/problems/trapping-rain-water/description/ * * algorithms * Hard (46.72%) * Likes: 5869 * Dislikes: 107 * Total Accepted: 445.4K * Total Submissions: 945.9K * Testcase Example: '[0,1,0,2,1,0,1,3,2,1,2,1]' * * Given n non-negative integers representing an elevation map where the width * of each bar is 1, compute how much water it is able to trap after raining.
* @lc app=leetcode id=42 lang=golang * * [42] Trapping Rain Water * * https://leetcode.com/problems/trapping-rain-water/description/ * * algorithms * Hard (46.72%) * Likes: 5869 * Dislikes: 107 * Total Accepted: 445.4K * Total Submissions: 945.9K * Testcase Example: '[0,1,0,2,1,0,1,3,2,1,2,1]' * * Given n non-negative integers representing an elevation map where the width * of each bar is 1, compute how much water it is able to trap after raining.
* @lc app=leetcode id=440 lang=golang * * [440] K-th Smallest in Lexicographical Order * * https://leetcode.com/problems/k-th-smallest-in-lexicographical-order/description/ * * algorithms * Hard (27.84%) * Likes: 270 * Dislikes: 45 * Total Accepted: 10.9K * Total Submissions: 39.1K * Testcase Example: '13\n2' * * Given integers n and k, find the lexicographically k-th smallest integer in * the range from 1 to n.
* @lc app=leetcode id=440 lang=golang * * [440] K-th Smallest in Lexicographical Order * * https://leetcode.com/problems/k-th-smallest-in-lexicographical-order/description/ * * algorithms * Hard (27.84%) * Likes: 270 * Dislikes: 45 * Total Accepted: 10.9K * Total Submissions: 39.1K * Testcase Example: '13\n2' * * Given integers n and k, find the lexicographically k-th smallest integer in * the range from 1 to n.
* @lc app=leetcode id=45 lang=golang * * [45] Jump Game II * * https://leetcode.com/problems/jump-game-ii/description/ * * algorithms * Hard (29.67%) * Likes: 2020 * Dislikes: 117 * Total Accepted: 231.8K * Total Submissions: 776.1K * Testcase Example: '[2,3,1,1,4]' * * Given an array of non-negative integers, you are initially positioned at the * first index of the array.
* @lc app=leetcode id=45 lang=golang * * [45] Jump Game II * * https://leetcode.com/problems/jump-game-ii/description/ * * algorithms * Hard (29.67%) * Likes: 2020 * Dislikes: 117 * Total Accepted: 231.8K * Total Submissions: 776.1K * Testcase Example: '[2,3,1,1,4]' * * Given an array of non-negative integers, you are initially positioned at the * first index of the array.
* @lc app=leetcode id=572 lang=golang * * [572] Subtree of Another Tree * * https://leetcode.com/problems/subtree-of-another-tree/description/ * * algorithms * Easy (43.69%) * Likes: 1816 * Dislikes: 85 * Total Accepted: 175K * Total Submissions: 400.4K * Testcase Example: '[3,4,5,1,2]\n[4,1,2]' * * * Given two non-empty binary trees s and t, check whether tree t has exactly * the same structure and node values with a subtree of s.
* @lc app=leetcode id=572 lang=golang * * [572] Subtree of Another Tree * * https://leetcode.com/problems/subtree-of-another-tree/description/ * * algorithms * Easy (43.69%) * Likes: 1816 * Dislikes: 85 * Total Accepted: 175K * Total Submissions: 400.4K * Testcase Example: '[3,4,5,1,2]\n[4,1,2]' * * * Given two non-empty binary trees s and t, check whether tree t has exactly * the same structure and node values with a subtree of s.
* @lc app=leetcode id=600 lang=golang * * [600] Non-negative Integers without Consecutive Ones * * https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/description/ * * algorithms * Hard (33.50%) * Likes: 309 * Dislikes: 66 * Total Accepted: 10.7K * Total Submissions: 31.9K * Testcase Example: '1' * * Given a positive integer n, find the number of non-negative integers less * than or equal to n, whose binary representations do NOT contain consecutive * ones.
* @lc app=leetcode id=600 lang=golang * * [600] Non-negative Integers without Consecutive Ones * * https://leetcode.com/problems/non-negative-integers-without-consecutive-ones/description/ * * algorithms * Hard (33.50%) * Likes: 309 * Dislikes: 66 * Total Accepted: 10.7K * Total Submissions: 31.9K * Testcase Example: '1' * * Given a positive integer n, find the number of non-negative integers less * than or equal to n, whose binary representations do NOT contain consecutive * ones.
* @lc app=leetcode id=672 lang=golang * * [672] Bulb Switcher II * * https://leetcode.com/problems/bulb-switcher-ii/description/ * * algorithms * Medium (50.52%) * Likes: 111 * Dislikes: 786 * Total Accepted: 11.3K * Total Submissions: 22.3K * Testcase Example: '1\n1' * * There is a room with n lights which are turned on initially and 4 buttons on * the wall.
* @lc app=leetcode id=672 lang=golang * * [672] Bulb Switcher II * * https://leetcode.com/problems/bulb-switcher-ii/description/ * * algorithms * Medium (50.52%) * Likes: 111 * Dislikes: 786 * Total Accepted: 11.3K * Total Submissions: 22.3K * Testcase Example: '1\n1' * * There is a room with n lights which are turned on initially and 4 buttons on * the wall.
* @lc app=leetcode id=72 lang=golang * * [72] Edit Distance * * https://leetcode.com/problems/edit-distance/description/ * * algorithms * Hard (41.17%) * Likes: 3296 * Dislikes: 50 * Total Accepted: 240.9K * Total Submissions: 570.7K * Testcase Example: '"horse"\n"ros"' * * Given two words word1 and word2, find the minimum number of operations * required to convert word1 to word2.
* @lc app=leetcode id=72 lang=golang * * [72] Edit Distance * * https://leetcode.com/problems/edit-distance/description/ * * algorithms * Hard (41.17%) * Likes: 3296 * Dislikes: 50 * Total Accepted: 240.9K * Total Submissions: 570.7K * Testcase Example: '"horse"\n"ros"' * * Given two words word1 and word2, find the minimum number of operations * required to convert word1 to word2.
* @lc app=leetcode id=735 lang=golang * * [735] Asteroid Collision * * https://leetcode.com/problems/asteroid-collision/description/ * * algorithms * Medium (39.94%) * Likes: 713 * Dislikes: 82 * Total Accepted: 44.2K * Total Submissions: 110.7K * Testcase Example: '[5,10,-5]' * * * We are given an array asteroids of integers representing asteroids in a * row.
* @lc app=leetcode id=735 lang=golang * * [735] Asteroid Collision * * https://leetcode.com/problems/asteroid-collision/description/ * * algorithms * Medium (39.94%) * Likes: 713 * Dislikes: 82 * Total Accepted: 44.2K * Total Submissions: 110.7K * Testcase Example: '[5,10,-5]' * * * We are given an array asteroids of integers representing asteroids in a * row.
* @lc app=leetcode id=892 lang=golang * * [892] Surface Area of 3D Shapes * * https://leetcode.com/problems/surface-area-of-3d-shapes/description/ * * algorithms * Easy (57.77%) * Likes: 206 * Dislikes: 266 * Total Accepted: 15.7K * Total Submissions: 27.1K * Testcase Example: '[[2]]' * * On a N * N grid, we place some 1 * 1 * 1 cubes.
* @lc app=leetcode id=892 lang=golang * * [892] Surface Area of 3D Shapes * * https://leetcode.com/problems/surface-area-of-3d-shapes/description/ * * algorithms * Easy (57.77%) * Likes: 206 * Dislikes: 266 * Total Accepted: 15.7K * Total Submissions: 27.1K * Testcase Example: '[[2]]' * * On a N * N grid, we place some 1 * 1 * 1 cubes.
*
* @lc app=leetcode id=997 lang=golang * * [997] Find the Town Judge * * https://leetcode.com/problems/find-the-town-judge/description/ * * algorithms * Easy (49.81%) * Likes: 412 * Dislikes: 51 * Total Accepted: 46.1K * Total Submissions: 92.5K * Testcase Example: '2\n[[1,2]]' * * In a town, there are N people labelled from 1 to N. There is a rumor that * one of these people is secretly the town judge.
* @lc app=leetcode id=997 lang=golang * * [997] Find the Town Judge * * https://leetcode.com/problems/find-the-town-judge/description/ * * algorithms * Easy (49.81%) * Likes: 412 * Dislikes: 51 * Total Accepted: 46.1K * Total Submissions: 92.5K * Testcase Example: '2\n[[1,2]]' * * In a town, there are N people labelled from 1 to N. There is a rumor that * one of these people is secretly the town judge.
* @lc app=leetcode id=10 lang=golang * * [10] Regular Expression Matching * * https://leetcode.com/problems/regular-expression-matching/description/ * * algorithms * Hard (24.86%) * Total Accepted: 272.8K * Total Submissions: 1.1M * Testcase Example: '"aa"\n"a"' * * Given an input string (s) and a pattern (p), implement regular expression * matching with support for '.' and '*'.
* @lc app=leetcode id=10 lang=golang * * [10] Regular Expression Matching * * https://leetcode.com/problems/regular-expression-matching/description/ * * algorithms * Hard (24.86%) * Total Accepted: 272.8K * Total Submissions: 1.1M * Testcase Example: '"aa"\n"a"' * * Given an input string (s) and a pattern (p), implement regular expression * matching with support for '.' and '*'.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL