brain

tamnd's digital brain — notes, problems, research

43815 notes

LeetCode 1056 - Confusing Number

The problem asks us to determine whether a given integer becomes a different valid number after being rotated by 180 degrees. Not every digit remains valid after rotation.

leetcodeeasymath
CF 77C - Beavermuncher-0xFF

We have a tree where each vertex initially contains some number of beavers. The robot starts at a fixed vertex s. Every time it traverses an edge from u to v, it immediately eats exactly one beaver at v. If v already has zero beavers left, the move is impossible.

codeforcescompetitive-programmingdfs-and-similardpdsugreedytrees
CF 71D - Solitaire

We are given a rectangular board filled with playing cards. The board size is at most $17 times 17$, but the total number of placed cards never exceeds 52 because the deck has only 52 regular cards plus two jokers. A valid 3×3 square must satisfy one of two properties: 1.

codeforcescompetitive-programmingbrute-forceimplementation
CF 38A - Army

Vasya currently holds rank a in the army and wants to eventually reach rank b. Moving from rank i to rank i + 1 requires a fixed number of years, stored in the array d.

codeforcescompetitive-programmingimplementation
CF 97C - Winning Strategy

Each year the university sends a team of exactly n students to the finals. Some of those students may already have participated once before, and the rest are newcomers.

codeforcescompetitive-programmingbinary-searchgraphsmathshortest-paths
CF 53E - Dead Ends

We are given an undirected connected graph representing roads between junctions. The mayor wants to remove some roads so that the remaining graph becomes a tree, meaning it stays connected and contains exactly n - 1 edges.

codeforcescompetitive-programmingbitmasksdp
LeetCode 188 - Best Time to Buy and Sell Stock IV

This problem asks us to maximize the profit from stock trading under a strict constraint: we can perform at most k transactions, where each transaction consists of buying and then later selling one share of the stock.

leetcodehardarraydynamic-programming
LeetCode 363 - Max Sum of Rectangle No Larger Than K

The problem asks us to find the rectangular submatrix whose sum is as large as possible while still being less than or equal to a given integer k. A rectangle in a matrix is any contiguous block of cells formed by choosing a range of rows and a range of columns.

leetcodehardarraybinary-searchmatrixprefix-sumordered-set
LeetCode 1484 - Group Sold Products By The Date

The problem gives us a database table named Activities with two columns: | Column | Meaning | | --- | --- | | selldate |

leetcodeeasydatabase
LeetCode 1328 - Break a Palindrome

The problem asks us to modify a given palindromic string in such a way that it is no longer a palindrome while ensuring

leetcodemediumstringgreedy
LeetCode 215 - Kth Largest Element in an Array

The problem asks us to find the kth largest element in an unsorted integer array. The important detail is that we are looking for the element that would appear in the kth position if the array were sorted in descending order. We are not looking for the kth distinct value.

leetcodemediumarraydivide-and-conquersortingheap-(priority-queue)quickselect
LeetCode 308 - Range Sum Query 2D - Mutable

The problem asks us to design a mutable 2D range sum data structure. We are given a matrix of integers, and we must support two operations efficiently: 1. Update the value at a specific cell. 2. Compute the sum of all values inside a rectangular submatrix.

leetcodemediumarraydesignbinary-indexed-treesegment-treematrix
LeetCode 1125 - Smallest Sufficient Team

This problem asks us to build the smallest possible team that collectively covers every required skill. We are given two inputs: - reqskills, a list of unique required skills - people, where people[i] contains the skills possessed by person i A team is considered sufficient if…

leetcodehardarraydynamic-programmingbit-manipulationbitmask
LeetCode 827 - Making A Large Island

This problem asks us to find the largest possible island size in a binary grid after changing at most one 0 into 1.

leetcodehardarraydepth-first-searchbreadth-first-searchunion-findmatrix
CF 35B - Warehouse

We are asked to simulate a warehouse with a grid-like shelving system. Each shelf has m sections, and there are n shelves stacked from top to bottom. Every section can hold at most one box.

codeforcescompetitive-programmingimplementation
LeetCode 2023 - Number of Pairs of Strings With Concatenation Equal to Target

The problem asks us to find the number of ordered pairs of indices (i, j) in a list of digit strings nums such that concatenating nums[i] and nums[j] produces exactly the string target.

leetcodemediumarrayhash-tablestringcounting
LeetCode 1082 - Sales Analysis I

This problem asks us to identify the seller or sellers who generated the highest total sales revenue. We are given two database tables: Product and Sales. The Product table contains information about products, including their IDs, names, and unit prices.

leetcodeeasydatabase
LeetCode 884 - Uncommon Words from Two Sentences

This problem asks us to find all words that are considered "uncommon" between two sentences. Each sentence is made up of lowercase words separated by single spaces. A word is considered uncommon if it satisfies two conditions: 1. It appears exactly once in one sentence. 2.

leetcodeeasyhash-tablestringcounting
CF 30B - Codeforces World Finals

We are given two dates in the format DD.MM.YY: one representing the day of the Codeforces World Finals and the other representing Bob's date of birth. Bob can rearrange the components of his birth date-the day, month, and year-but only as complete numbers, not individual digits.

codeforcescompetitive-programmingimplementation
LeetCode 702 - Search in a Sorted Array of Unknown Size

This problem asks us to search for a target value inside a sorted array, but with an important limitation: we do not know the size of the array, and we cannot access the array directly. Instead of normal array indexing, we interact with the array through an ArrayReader interface.

leetcodemediumarraybinary-searchinteractive
LeetCode 1458 - Max Dot Product of Two Subsequences

The problem is asking to find the maximum dot product of two non-empty subsequences of arrays nums1 and nums2 such that

leetcodehardarraydynamic-programming
CF 23E - Tree

We are given a tree with _n_ nodes, described by _n-1_ edges. A tree is a connected acyclic graph, so there is exactly one path between any two vertices. Bob can delete any subset of edges, possibly none, and then he looks at the sizes of the resulting connected components.

codeforcescompetitive-programmingdp
LeetCode 958 - Check Completeness of a Binary Tree

The problem asks us to determine whether a given binary tree is a complete binary tree. A complete binary tree has a specific structural property: every level, except possibly the last, is completely filled, and in the last level, all nodes appear as far left as possible.

leetcodemediumtreebreadth-first-searchbinary-tree
CF 128B - String

We are given a string of lowercase letters and an integer k. The task is to generate all possible substrings of the string, sort them lexicographically, and return the k-th substring in that order.

codeforcescompetitive-programmingbrute-forceconstructive-algorithmshashingimplementationstring-suffix-structuresstrings
CF 56D - Changing a String

We are given two uppercase strings, s and t. We may transform s using three operations: 1. Insert a character at any position. 2. Delete a character from any position. 3. Replace one character with another. Every operation costs exactly one move.

codeforcescompetitive-programmingdp
CF 108A - Palindromic Times

The task is to find the next time on a 24-hour digital clock that reads as a palindrome. The input is a string formatted as "HH:MM", representing hours and minutes in 24-hour notation.

codeforcescompetitive-programmingimplementationstrings
LeetCode 1603 - Design Parking System

This problem asks us to design a very small parking lot management system. The parking lot contains exactly three types

leetcodeeasydesignsimulationcounting
LeetCode 1682 - Longest Palindromic Subsequence II

The problem is asking us to find the length of the longest good palindromic subsequence in a given string s. A good pali

leetcodemediumstringdynamic-programming
LeetCode 1101 - The Earliest Moment When Everyone Become Friends

The problem is asking us to determine the earliest time at which a group of n people all become mutually acquainted, given a sequence of friendship formation events with timestamps.

leetcodemediumarrayunion-findsorting
LeetCode 645 - Set Mismatch

The problem describes a corrupted set of integers. Originally, the set contained every number from 1 through n exactly once. Because of an error, one number was duplicated, which means one other number disappeared.

leetcodeeasyarrayhash-tablebit-manipulationsorting
CF 100B - Friendly Numbers

We are asked to determine whether a set of non-zero integers forms a "friendly group," meaning every pair of numbers satisfies a divisibility relationship: one number divides the other.

codeforcescompetitive-programming*specialimplementation
CF 22C - System Administrator

We are asked to design a network of servers where each server is a node, and each connection between two servers is an undirected edge. There are n servers and we are allowed exactly m connections.

codeforcescompetitive-programminggraphs
LeetCode 1033 - Moving Stones Until Consecutive

The problem presents three stones placed on distinct positions along a one-dimensional X-axis, represented by integers a, b, and c.

leetcodemediummathbrainteaser
CF 83E - Two Subsequences

We are given a sequence of binary strings, all of equal length, and we need to split them into two subsequences in a way that minimizes the sum of the lengths of their compressed forms.

codeforcescompetitive-programmingbitmasksdp
LeetCode 531 - Lonely Pixel I

The problem gives us a 2D grid called picture, where each cell contains either: - 'B', representing a black pixel - 'W', representing a white pixel We need to count how many lonely black pixels exist in the matrix. A black pixel is considered lonely if: 1. It is black ('B') 2.

leetcodemediumarrayhash-tablematrix
LeetCode 186 - Reverse Words in a String II

The problem asks us to reverse the order of words in a character array s in-place. Each word is a contiguous sequence of non-space characters, and words are separated by exactly one space.

leetcodemediumtwo-pointersstring
CF 72D - Perse-script

We are asked to evaluate a string expression in a small function-based language. Every string literal is enclosed in quotes, and there are only four types of functions: concat, reverse, and substr in two forms. Each function operates only on strings or integers as indices.

codeforcescompetitive-programming*specialexpression-parsing
LeetCode 218 - The Skyline Problem

The Skyline Problem asks us to compute the visible outer contour formed by a collection of rectangular buildings when viewed from far away. Each building is represented by three integers: a left x-coordinate, a right x-coordinate, and a height.

leetcodehardarraydivide-and-conquerbinary-indexed-treesegment-treesweep-linesortingheap-(priority-queue)ordered-set
LeetCode 497 - Random Point in Non-overlapping Rectangles

The problem asks us to randomly pick an integer point from a set of non-overlapping rectangles in 2D space. Each rectangle is defined by its bottom-left (ai, bi) and top-right (xi, yi) corners.

leetcodemediumarraymathbinary-searchreservoir-samplingprefix-sumordered-setrandomized
CF 11B - Jumping Jack

Jack starts at position 0 on a number line. His jumps have fixed lengths: the first jump must have length 1, the second jump length 2, the third jump length 3, and so on. For every jump he may choose either direction.

codeforcescompetitive-programmingmath
LeetCode 334 - Increasing Triplet Subsequence

The problem asks us to determine whether an array contains three numbers that form a strictly increasing subsequence.

leetcodemediumarraygreedy
LeetCode 1387 - Sort Integers by The Power Value

This problem asks us to rank integers according to a special metric called the "power value". The power value of a numbe

leetcodemediumdynamic-programmingmemoizationsorting
LeetCode 250 - Count Univalue Subtrees

The problem asks us to count how many subtrees in a binary tree are "uni-value" subtrees. A uni-value subtree is a subtree in which every node has the same value. A subtree consists of a node together with all of its descendants.

leetcodemediumtreedepth-first-searchbinary-tree
CF 103D - Time to Raid Cowavans

We have an array of cow weights. For every query (a, b), we repeatedly take positions a, a + b, a + 2b, ... until the index exceeds n, and we must output the sum of all visited values.

codeforcescompetitive-programmingbrute-forcedata-structuressortings
LeetCode 738 - Monotone Increasing Digits

The problem asks us to find the largest integer less than or equal to a given number n, such that its digits are monotone increasing. A number has monotone increasing digits when every digit is less than or equal to the digit that comes after it.

leetcodemediummathgreedy
CF 1B - Spreadsheet

The task gives spreadsheet cell coordinates written in one of two formats, and for every coordinate we must convert it into the other format.

codeforcescompetitive-programmingimplementationmath
LeetCode 71 - Simplify Path

The problem gives us an absolute Unix-style file path and asks us to convert it into its canonical, simplified form. An absolute path always starts from the root directory, represented by /.

leetcodemediumstringstack
LeetCode 398 - Random Pick Index

The problem gives us an integer array nums that may contain duplicate values. We must design a class that supports repeatedly selecting a random index for a given target value.

leetcodemediumhash-tablemathreservoir-samplingrandomized
CF 100F - Polynom

We are given a polynomial already factorized into linear terms: $$p(x) = (x + a1)(x + a2)dots(x + an)$$ The task is to expand this product and print the polynomial in the usual descending-power form: $$x^n + b1x^{n-1} + dots + bn$$ The tricky part is not the expansion itself.

codeforcescompetitive-programming*specialimplementation
LeetCode 266 - Palindrome Permutation

The problem asks whether the characters of a given string can be rearranged to form a palindrome. A palindrome is a string that reads the same forward and backward. Examples include "racecar", "abba", and "a".

leetcodeeasyhash-tablestringbit-manipulation
LeetCode 1136 - Parallel Courses

The problem is asking us to determine the minimum number of semesters required to complete n courses given a set of prerequisite relationships.

leetcodemediumgraph-theorytopological-sort
LeetCode 1561 - Maximum Number of Coins You Can Get

The problem gives us an array called piles, where each element represents the number of coins in a pile. The length of the array is always divisible by 3, meaning there are exactly 3n piles for some integer n. In every round, three piles are selected.

leetcodemediumarraymathgreedysortinggame-theory
LeetCode 1107 - New Users Daily Count

We are given a database table called Traffic that records different user activities on different dates. Each row contains a userid, an activity type, and an activitydate.

leetcodemediumdatabase
LeetCode 548 - Split Array with Equal Sum

The problem asks us to determine whether an integer array nums can be split into four non-empty subarrays with equal sums by selecting three indices i, j, and k that satisfy strict ordering constraints: 0 < i, i + 1 < j, j + 1 < k < n - 1.

leetcodehardarrayhash-tableprefix-sum
CF 128D - Numbers

We are given a multiset of numbers and asked whether it is possible to arrange them in a circle so that every pair of adjacent numbers differs by exactly one. Conceptually, this means each number is a vertex on a cycle, and the absolute difference between neighbors must be 1.

codeforcescompetitive-programmingconstructive-algorithmsimplementation
LeetCode 1403 - Minimum Subsequence in Non-Increasing Order

The problem gives an integer array nums and asks us to build a subsequence whose sum is strictly greater than the sum of

leetcodeeasyarraygreedysorting
LeetCode 420 - Strong Password Checker

The problem asks us to determine the minimum number of operations required to transform a given password into a "strong" password according to three rules. A strong password must satisfy all of the following conditions: 1.

leetcodehardstringgreedyheap-(priority-queue)
LeetCode 1257 - Smallest Common Region

This problem describes a hierarchical relationship between geographic regions. Each list in regions represents a parent-child relationship where the first element is the parent region and every remaining element in the list is directly contained within that parent.

leetcodemediumarrayhash-tablestringtreedepth-first-searchbreadth-first-search
LeetCode 840 - Magic Squares In Grid

The problem asks us to count the number of 3 x 3 magic squares inside a larger grid. A magic square is defined as a square where all numbers are distinct integers from 1 to 9 and the sum of each row, column, and the two diagonals is the same.

leetcodemediumarrayhash-tablemathmatrix
LeetCode 20 - Valid Parentheses

The problem gives a string containing only six possible characters: (, ), {, }, [ and ]. Each opening bracket must eventually be matched with the correct closing bracket, and the order of matching matters.

leetcodeeasystringstack
LeetCode 586 - Customer Placing the Largest Number of Orders

The problem gives us a database table named Orders with two columns: Column Meaning --- --- ordernumber Unique identifier for an order customernumber Identifier for the customer who placed the order Each row represents a single order placed by a customer.

leetcodeeasydatabase
LeetCode 1029 - Two City Scheduling

In this problem, we are given an array called costs, where each element represents the travel cost for one person to two different cities.

leetcodemediumarraygreedysorting
LeetCode 618 - Students Report By Geography

The problem asks us to transform a table of student names and their continents into a pivoted report, where each continent becomes a column and the student names appear alphabetically under their respective continents.

leetcodeharddatabase
LeetCode 108 - Convert Sorted Array to Binary Search Tree

The problem gives us a sorted integer array nums in strictly increasing order and asks us to convert it into a height-balanced binary search tree (BST). A binary search tree is a binary tree where: - Every node in the left subtree contains values smaller than the current node.

leetcodeeasyarraydivide-and-conquertreebinary-search-treebinary-tree
CF 91C - Ski Base

We are asked to count the number of valid ski bases after each road is added to an initially empty graph. The graph consists of junctions as vertices and roads as edges.

codeforcescompetitive-programmingcombinatoricsdsugraphs
CF 70E - Information Reform

We are given a country with cities connected by roads such that the road network forms a tree: there is exactly one simple path between any two cities. Each road has equal length in terms of counting the number of edges.

codeforcescompetitive-programmingdpimplementationtrees
LeetCode 224 - Basic Calculator

The problem gives us a string representing a mathematical expression containing integers, addition, subtraction, parentheses, and spaces. Our task is to evaluate the expression and return the final integer result. The expression is guaranteed to be valid.

leetcodehardmathstringstackrecursion
LeetCode 608 - Tree Node

This problem gives us a database table named Tree, where each row represents a node in a tree structure. Every node has a unique identifier id and a pid column that stores the identifier of its parent node.

leetcodemediumdatabase
CF 5E - Bindian Signalizing

We are given a circular arrangement of hills around a capital. Each hill has a height and a watchman who can send signals via fire. The core question is: how many pairs of watchmen can see each other’s signals?

codeforcescompetitive-programmingdata-structures
LeetCode 282 - Expression Add Operators

The problem gives us a numeric string num and an integer target. We must insert binary operators, specifically '+', '-', and '', between the digits of the string so that the resulting mathematical expression evaluates exactly to target.

leetcodehardmathstringbacktracking
LeetCode 1618 - Maximum Font to Fit a Sentence in a Screen

In this problem, we are given a string text that must be displayed on a single line inside a screen with width w and hei

leetcodemediumarraystringbinary-searchinteractive
CF 93D - Flags

We need to count stripe sequences built from four colors: black, red, white, and yellow. A sequence is valid if it satisfies several local restrictions. Equal adjacent colors are forbidden. White cannot touch yellow. Red cannot touch black.

codeforcescompetitive-programmingdpmathmatrices
CF 59E - Shortest Path

We are asked to navigate a graph of cities connected by bidirectional roads, with a twist: certain sequences of three consecutive cities are forbidden due to superstition. Formally, there are n nodes and m edges, all unweighted, representing cities and roads.

codeforcescompetitive-programminggraphsshortest-paths
CF 81B - Sequence Formatting

We are given a messy textual representation of a sequence. The string may contain positive integers, commas, spaces, and the special token .... Spaces may appear in the wrong places or appear multiple times. The task is purely formatting.

codeforcescompetitive-programmingimplementationstrings
CF 37D - Lesson Timetable

Each student group attends exactly two lessons. For a group, the classroom used in the first lesson must not exceed the classroom used in the second lesson.

codeforcescompetitive-programmingcombinatoricsdpmath
CF 39E - What Has Dirichlet Got to Do with That?

We start with a distinct boxes and b distinct items. Since boxes may stay empty and every item independently chooses one of the boxes, the number of possible placements is simply:

codeforcescompetitive-programmingdpgames
LeetCode 1425 - Constrained Subsequence Sum

That is a long, structured reference document. To make sure I target the exact problem correctly, please confirm the Lee

leetcodehardarraydynamic-programmingqueuesliding-windowheap-(priority-queue)monotonic-queue
LeetCode 1073 - Adding Two Negabinary Numbers

The problem asks us to add two numbers that are represented in negabinary, which is base -2. Unlike standard binary (base 2), each bit in negabinary contributes a value multiplied by powers of -2.

leetcodemediumarraymath
LeetCode 229 - Majority Element II

The problem asks us to find every element in an integer array that appears more than ⌊ n/3 ⌋ times, where n is the length of the array. The floor notation means we round down to the nearest integer.

leetcodemediumarrayhash-tablesortingcounting
LeetCode 1030 - Matrix Cells in Distance Order

This problem asks us to return every cell in a matrix, ordered by its Manhattan distance from a given center cell.

leetcodeeasyarraymathgeometrysortingmatrix
LeetCode 910 - Smallest Range II

The problem gives us an integer array nums and an integer k. For every element in the array, we must choose exactly one of two operations: - add k - subtract k After modifying every element, we calculate the score of the array, which is defined as: Our goal is to minimize this…

leetcodemediumarraymathgreedysorting
CF 130D - Exponentiation

We need to compute the remainder when $a^b$ is divided by $c$. The input gives three integers, one per line. The first value is the base, the second is the exponent, and the third is the modulus. The direct interpretation is straightforward.

codeforcescompetitive-programming*special
LeetCode 2009 - Minimum Number of Operations to Make Array Continuous

The problem asks us to transform a given integer array nums into a continuous array with the minimum number of operations.

leetcodehardarrayhash-tablebinary-searchsliding-window
CF 65D - Harry Potter and the Sorting Hat

We process students one by one. Each student either has a fixed house, represented by one of the letters G, H, R, S, or has ambiguous ancestry, represented by ?. A fixed student always goes into that house. A ? student behaves differently.

codeforcescompetitive-programmingbrute-forcedfs-and-similarhashing
LeetCode 284 - Peeking Iterator

The problem asks us to extend the functionality of a standard iterator with an additional peek operation. A standard iterator provides two operations: next(), which returns the next element in the sequence and advances the pointer, and hasNext(), which tells whether there are…

leetcodemediumarraydesigniterator
LeetCode 839 - Similar String Groups

The problem asks us to determine the number of similarity groups within a list of strings. Two strings are defined as similar if they are either identical or if we can swap exactly two letters in one string to make it equal to the other.

leetcodehardarrayhash-tablestringdepth-first-searchbreadth-first-searchunion-find
CF 82C - General Mobilization

We have a rooted tree with root at city 1. Every city initially contains exactly one military division. Division i starts in city i and has priority a[i], where a smaller value means higher priority. Each edge has a capacity.

codeforcescompetitive-programmingdata-structuresdfs-and-similarsortings
CF 44H - Phone Number

We are given Masha's phone number as a string of digits. From this number, she generates another phone number digit by digit. The first digit of the new number can be any digit from 0 to 9.

codeforcescompetitive-programmingdp
LeetCode 867 - Transpose Matrix

This problem asks us to compute the transpose of a given two dimensional matrix. A transpose operation flips a matrix across its main diagonal.

leetcodeeasyarraymatrixsimulation
LeetCode 1379 - Find a Corresponding Node of a Binary Tree in a Clone of That Tree

The traversal is by reference, not value.

leetcodeeasytreedepth-first-searchbreadth-first-searchbinary-tree
LeetCode 463 - Island Perimeter

The problem asks us to calculate the perimeter of an island represented in a 2D grid. Each cell in the grid is either land (1) or water (0). The island consists of one or more connected land cells, where connectivity is strictly horizontal or vertical.

leetcodeeasyarraydepth-first-searchbreadth-first-searchmatrix
LeetCode 12 - Integer to Roman

The problem asks us to convert a positive integer into its Roman numeral representation. Roman numerals use combinations of specific symbols to represent values, and the rules for combining those symbols are strict.

leetcodemediumhash-tablemathstring
LeetCode 66 - Plus One

The problem gives us a non-empty array of digits that together represent a large integer. Each element in the array is a single decimal digit, and the digits are stored in left-to-right order from the most significant digit to the least significant digit.

leetcodeeasyarraymath
LeetCode 486 - Predict the Winner

The problem describes a two-player game played on an integer array. Players alternate turns, and during each turn a player may only take a number from one of the two ends of the array. The chosen value is added to that player's score, and the element is removed from the array.

leetcodemediumarraymathdynamic-programmingrecursiongame-theory
LeetCode 1816 - Truncate Sentence

The problem gives us a sentence s and an integer k. A sentence is guaranteed to contain words separated by exactly one space, with no extra spaces at the beginning or end. Our task is to return a new sentence that contains only the first k words from the original sentence.

leetcodeeasyarraystring
LeetCode 185 - Department Top Three Salaries

This is a SQL database problem where we need to identify the employees who belong to the top three unique salaries within each department.

leetcodeharddatabase
CF 47C - Crossword

We are given six words and must arrange them into a very specific crossword shape. The shape looks like a rectangular infinity symbol. There are three horizontal words and three vertical words, and they intersect at fixed positions.

codeforcescompetitive-programmingimplementation
LeetCode 331 - Verify Preorder Serialization of a Binary Tree

The problem gives us a string that represents the preorder serialization of a binary tree. Each value is separated by commas. A normal integer represents a real tree node, while the character '' represents a null pointer.

leetcodemediumstringstacktreebinary-tree
LeetCode 1537 - Get the Maximum Score

Here’s a complete, detailed technical solution guide for LeetCode 1537 - Get the Maximum Score following your requested

leetcodehardarraytwo-pointersdynamic-programminggreedy
LeetCode 1471 - The k Strongest Values in an Array

This problem asks us to find the k strongest values in an array according to a custom definition of "strength". The firs

leetcodemediumarraytwo-pointerssorting