brain

tamnd's digital brain — notes, problems, research

42677 notes

LeetCode 1060 - Missing Element in Sorted Array

The problem asks us to find the k-th missing number in a sorted, strictly increasing array of unique integers. Given nums and an integer k, we need to identify the number that is missing from the sequence formed by consecutive integers starting from nums[0].

leetcodemediumarraybinary-search
LeetCode 717 - 1-bit and 2-bit Characters

In this problem, we are given a binary array called bits. The array represents a sequence of encoded characters using the following rules: - A one-bit character is represented by a single 0 - A two-bit character is represented by either 10 or 11 The array is guaranteed to end…

leetcodeeasyarray
LeetCode 1542 - Find Longest Awesome Substring

The problem asks us to find the length of the longest awesome substring in a given string s consisting of digits. A subs

leetcodehardhash-tablestringbit-manipulation
LeetCode 1794 - Count Pairs of Equal Substrings With Minimum Difference

This problem asks us to count quadruples of indices (i, j, a, b) where substrings from two given strings are equal and the difference j - a is minimized. Specifically, i and j define a substring in firstString, while a and b define a substring in secondString.

leetcodemediumhash-tablestringgreedy
LeetCode 753 - Cracking the Safe

This problem asks us to generate the shortest possible string that guarantees a safe will unlock at some point while typing it. The safe password has exactly n digits, and each digit can be any value from 0 to k - 1. The safe does not validate the entire entered sequence at once.

leetcodehardstringdepth-first-searchgraph-theoryeulerian-circuit
LeetCode 1415 - The k-th Lexicographical String of All Happy Strings of Length n

The problem asks us to generate strings of length n using only the characters 'a', 'b', and 'c', with one important rest

leetcodemediumstringbacktracking
LeetCode 744 - Find Smallest Letter Greater Than Target

The problem gives us a sorted array of lowercase English letters and a target character. Our task is to find the smallest character in the array that is strictly greater than the target character in lexicographical order.

leetcodeeasyarraybinary-search
LeetCode 1341 - Movie Rating

This problem works with three relational database tables: Movies, Users, and MovieRating. The goal is to produce a result containing exactly two rows. The first row should contain the name of the user who rated the greatest number of movies.

leetcodemediumdatabase
LeetCode 2308 - Arrange Table by Gender

The problem asks us to rearrange the rows of a Genders table in a specific repeating order while maintaining internal so

leetcodemediumdatabase
CF 5D - Follow Traffic Rules

We are asked to compute the minimum travel time for a car moving along a straight road from Berland to Bercouver. The road has length _l_, and at a distance _d_ from the start there is a speed sign that limits the car's instantaneous speed to _w_.

codeforcescompetitive-programmingimplementationmath
CF 22B - Bargaining Table

The office floor is represented as an n × m grid. Each cell is either free, written as 0, or blocked by furniture, written as 1. We want to place one rectangular table whose sides stay aligned with the grid. Every cell covered by the rectangle must be free.

codeforcescompetitive-programmingbrute-forcedp
CF 8D - Two Friends

We have three points on a plane: the cinema, the house, and the shop.

codeforcescompetitive-programmingbinary-searchgeometry
LeetCode 222 - Count Complete Tree Nodes

The problem asks us to count how many nodes exist in a complete binary tree. A complete binary tree has a very specific structure. Every level except possibly the last one is completely filled, and the nodes on the final level appear as far left as possible.

leetcodeeasybinary-searchbit-manipulationtreebinary-tree
LeetCode 842 - Split Array into Fibonacci Sequence

The problem gives us a string consisting only of digits, and asks us to split it into a sequence of integers that behaves like a Fibonacci sequence. A Fibonacci-like sequence follows three important rules: 1.

leetcodemediumstringbacktracking
LeetCode 1599 - Maximum Profit of Operating a Centennial Wheel

This problem asks us to simulate the operation of a Centennial Wheel and determine the minimum number of rotations requi

leetcodemediumarraysimulation
CF 9B - Running Student

The student is already riding a bus that moves along the x-axis from left to right. The bus stops at fixed positions (xi, 0) in increasing order. At any stop except the first one, the student may get off and run directly to the university located at (xu, yu).

codeforcescompetitive-programmingbrute-forcegeometryimplementation
CF 2B - The least round way

We have an n × n grid of non-negative integers. Starting from the top-left corner, we may move only right or down until we reach the bottom-right corner. Along a chosen path, we multiply every visited value together.

codeforcescompetitive-programmingdpmath
LeetCode 1827 - Minimum Operations to Make the Array Increasing

The problem asks us to transform a given integer array nums into a strictly increasing array using the minimum number of operations. An operation consists of incrementing any element of the array by 1.

leetcodeeasyarraygreedy
LeetCode 1206 - Design Skiplist

This problem asks us to implement a Skiplist from scratch, a probabilistic data structure that allows efficient search, insertion, and deletion operations.

leetcodehardlinked-listdesign
LeetCode 76 - Minimum Window Substring

The problem asks us to find the smallest contiguous substring inside string s that contains every character from string t, including duplicate occurrences. A substring must consist of consecutive characters. We are not allowed to reorder characters or skip positions.

leetcodehardhash-tablestringsliding-window
LeetCode 916 - Word Subsets

The problem asks us to determine which strings in words1 satisfy all character requirements imposed by every string in words2. A string b is considered a subset of another string a if every character in b appears in a at least as many times as it appears in b.

leetcodemediumarrayhash-tablestring
LeetCode 765 - Couples Holding Hands

This problem gives us a row of seats represented by the array row, where each value is the ID of the person currently sitting in that seat. The row contains 2n people, meaning there are exactly n couples.

leetcodehardgreedydepth-first-searchbreadth-first-searchunion-findgraph-theory
CF 42D - Strange town

We are asked to construct a fully connected graph of _N_ tourist attractions, where each road has a distinct positive integer cost not exceeding 1000.

codeforcescompetitive-programmingconstructive-algorithmsmath
LeetCode 342 - Power of Four

This problem asks us to determine whether a given integer n is an exact power of four. In other words, we need to check whether there exists some integer x such that: Examples of powers of four are: The input consists of a single integer n, and the expected output is a boolean…

leetcodeeasymathbit-manipulationrecursion
LeetCode 899 - Orderly Queue

This problem gives us a string s and an integer k. We are allowed to repeatedly perform one operation: - Choose one of the first k characters of the string. - Remove that character from its current position. - Append it to the end of the string.

leetcodehardmathstringsorting
LeetCode 681 - Next Closest Time

The problem gives us a valid time string in the format "HH:MM" and asks us to construct the next chronological time using only the digits already present in the original time. The important detail is that digits may be reused any number of times.

leetcodemediumhash-tablestringbacktrackingenumeration
LeetCode 1547 - Minimum Cost to Cut a Stick

The problem asks us to determine the minimum total cost of cutting a wooden stick into pieces at specified positions. Th

leetcodehardarraydynamic-programmingsorting
LeetCode 917 - Reverse Only Letters

The problem asks us to reverse only the English letters in a string while keeping all non-letter characters fixed in their original positions. In other words, letters move, but symbols, digits, and punctuation marks stay exactly where they started.

leetcodeeasytwo-pointersstring
LeetCode 1786 - Number of Restricted Paths From First to Last Node

This problem gives us an undirected weighted graph with n nodes labeled from 1 to n. Every edge connects two nodes and has a positive weight. The graph is guaranteed to be connected, meaning there is always at least one path between any pair of nodes.

leetcodemediumdynamic-programminggraph-theorytopological-sortheap-(priority-queue)shortest-path
LeetCode 662 - Maximum Width of Binary Tree

The problem asks us to compute the maximum width among all levels of a binary tree. The important detail is that the width is not simply the number of non-null nodes at a level.

leetcodemediumtreedepth-first-searchbreadth-first-searchbinary-tree
LeetCode 324 - Wiggle Sort II

The problem asks us to rearrange an array so that it follows a strict alternating pattern: - nums[0] < nums[1] - nums[1] nums[2] - nums[2] < nums[3] - and so on. This pattern is called a wiggle sequence because the values repeatedly go up and down.

leetcodemediumarraydivide-and-conquergreedysortingquickselect
LeetCode 1554 - Strings Differ by One Character

This problem gives us an array of unique strings called dict, where every string has the same length. We must determine whether there exists at least one pair of strings that differ by exactly one character at the same position.

leetcodemediumhash-tablestringrolling-hashhash-function
LeetCode 1450 - Number of Students Doing Homework at a Given Time

This problem asks us to determine how many students are doing homework at a specific point in time, given arrays represe

leetcodeeasyarray
LeetCode 1391 - Check if There is a Valid Path in a Grid

The problem presents a grid where each cell represents a street segment with a specific orientation, denoted by a number

leetcodemediumarraydepth-first-searchbreadth-first-searchunion-findmatrix
CF 103E - Buying Sets

We are given several sets of integers, each with an associated cost. We may choose any collection of these sets, including the empty collection. Let the number of chosen sets be $k$, and let the union of all chosen sets contain $u$ distinct integers.

codeforcescompetitive-programmingflowsgraph-matchings
LeetCode 254 - Factor Combinations

The problem asks us to generate every unique way to express a number n as a product of integers greater than 1 and less than n. A factor combination is a list of integers whose product equals n. The order inside a combination does not matter.

leetcodemediumbacktracking
LeetCode 912 - Sort an Array

The problem asks us to sort an integer array in ascending order without using any built in sorting functions. The result must contain the same elements as the input, but arranged from smallest to largest. The input is an array nums containing integers.

leetcodemediumarraydivide-and-conquersortingheap-(priority-queue)merge-sortbucket-sortradix-sortcounting-sort
CF 45H - Road Problem

We are given a connected undirected graph representing a road network. Every junction is a vertex, every road is an edge, and there is at most one edge between any pair of vertices.

codeforcescompetitive-programminggraphs
CF 36A - Extra-terrestrial Intelligence

We are given a binary string representing Vasya's observations over several days. A character '1' means a signal was received on that day, while '0' means no signal appeared.

codeforcescompetitive-programmingimplementation
LeetCode 1306 - Jump Game III

The problem gives us an array of non-negative integers and a starting index. From any position i, we are allowed to jump

leetcodemediumarraydepth-first-searchbreadth-first-search
LeetCode 771 - Jewels and Stones

In this problem, we are given two strings, jewels and stones. The string jewels represents all stone types that are considered jewels. Each character is a unique jewel type. For example, if jewels = "aA", then both lowercase 'a' and uppercase 'A' are jewel types.

leetcodeeasyhash-tablestring
LeetCode 1608 - Special Array With X Elements Greater Than or Equal X

The problem gives us an array nums containing non-negative integers. We need to determine whether there exists an intege

leetcodeeasyarraybinary-searchsorting
LeetCode 94 - Binary Tree Inorder Traversal

This problem asks us to perform an inorder traversal on a binary tree and return the values of the visited nodes in the correct order. A binary tree is a hierarchical data structure where each node can have at most two children, a left child and a right child.

leetcodeeasystacktreedepth-first-searchbinary-tree
LeetCode 944 - Delete Columns to Make Sorted

The problem gives us an array of strings where every string has exactly the same length. If we place all strings vertically, character by character, the strings form a rectangular grid.

leetcodeeasyarraystring
LeetCode 1429 - First Unique Number

The problem requires designing a data structure that can efficiently maintain and retrieve the first unique integer in a

leetcodemediumarrayhash-tabledesignqueuedata-stream
LeetCode 1163 - Last Substring in Lexicographical Order

The problem asks us to find the substring of a given string s that is lexicographically largest among all possible substrings. A substring is any contiguous portion of the string.

leetcodehardtwo-pointersstring
LeetCode 1182 - Shortest Distance to Target Color

The problem gives us an array called colors, where each position contains one of three possible values: 1, 2, or 3. Each value represents a color assigned to that index. We are also given a list of queries.

leetcodemediumarraybinary-searchdynamic-programming
LeetCode 1272 - Remove Interval

The problem asks us to remove a given interval toBeRemoved from a list of non-overlapping, sorted intervals intervals. E

leetcodemediumarray
LeetCode 524 - Longest Word in Dictionary through Deleting

The problem gives us a source string s and a list of candidate words called dictionary. We must determine which dictionary word can be formed by deleting characters from s without changing the relative order of the remaining characters.

leetcodemediumarraytwo-pointersstringsorting
LeetCode 335 - Self Crossing

The problem describes a path traced on a two-dimensional grid. We begin at the origin (0, 0) and move according to the values in the distance array.

leetcodehardarraymathgeometry
CF 20A - BerOS file system

We are given a filesystem path as a string. In this operating system, multiple consecutive '/' characters are treated exactly the same as a single '/'. That means paths like ///home//user///docs and /home/user/docs refer to the same location.

codeforcescompetitive-programmingimplementation
LeetCode 359 - Logger Rate Limiter

The problem asks us to design a logging system that controls how frequently identical messages can be printed. Each message is associated with a timestamp, and the same message is only allowed to be printed once every 10 seconds.

leetcodeeasyhash-tabledesigndata-stream
CF 131A - cAPS lOCK

The problem gives us a single word consisting of uppercase and lowercase Latin letters. This word may have been typed with the Caps Lock key unintentionally engaged. We are asked to correct such accidental capitalization.

codeforcescompetitive-programmingimplementationstrings
LeetCode 177 - Nth Highest Salary

This problem asks us to write a SQL function that returns the nth highest distinct salary from the Employee table. The table contains two columns: Column Meaning --- --- id Unique employee identifier salary Employee salary The key detail is that the salary must be distinct.

leetcodemediumdatabase
LeetCode 1432 - Max Difference You Can Get From Changing an Integer

The problem gives us an integer num, and we are allowed to perform a digit replacement operation twice, independently. I

leetcodemediummathgreedy
LeetCode 1169 - Invalid Transactions

The problem asks us to identify transactions that are potentially invalid based on two rules. First, any transaction with an amount greater than $1000 is invalid.

leetcodemediumarrayhash-tablestringsorting
CF 31C - Schedule

We are given a list of n lessons, each with a start and end time, scheduled in a single room. Two lessons overlap if one starts before another ends. The goal is to find which single lesson can be removed so that the remaining lessons have no overlaps.

codeforcescompetitive-programmingimplementation
LeetCode 1657 - Determine if Two Strings Are Close

The problem asks whether two strings, word1 and word2, are "close" according to two allowed operations. Operation 1 allows swapping any two existing characters in the string, which means the relative order of characters is flexible.

leetcodemediumhash-tablestringsortingcounting
CF 66E - Petya and Post

We have a circular route with n post offices, each with a gas station. Each station i has a[i] liters of gasoline available, and the distance from station i to i+1 is b[i] kilometers, wrapping around at the end.

codeforcescompetitive-programmingdata-structuresdp
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
CF 35C - Fire Again

We have a rectangular grid of trees. A fire starts simultaneously from several cells, and every minute it spreads to neighboring cells that share a side. The task is to find any cell whose burning time is as large as possible, meaning it catches fire later than every other tree.

codeforcescompetitive-programmingbrute-forcedfs-and-similarshortest-paths
LeetCode 46 - Permutations

The problem gives us an array of distinct integers called nums, and asks us to generate every possible permutation of those numbers. A permutation is an arrangement of elements in a specific order.

leetcodemediumarraybacktracking
LeetCode 329 - Longest Increasing Path in a Matrix

The problem gives us a two-dimensional grid of integers called matrix. Each position in the grid contains a value, and we are asked to find the length of the longest strictly increasing path.

leetcodehardarraydynamic-programmingdepth-first-searchbreadth-first-searchgraph-theorytopological-sortmemoizationmatrix
LeetCode 621 - Task Scheduler

The Task Scheduler problem asks us to determine the minimum number of CPU intervals required to complete a list of tasks with a cooling constraint. Each task is represented by an uppercase letter A-Z. The CPU can execute one task per interval or remain idle.

leetcodemediumarrayhash-tablegreedysortingheap-(priority-queue)counting
CF 25C - Roads in Berland

We are given a map of _n_ cities in Berland, where the shortest distances between all pairs are already known. Conceptually, this means the country is fully connected via some unknown set of roads, and the distance matrix is already the all-pairs shortest path result.

codeforcescompetitive-programminggraphsshortest-paths
LeetCode 1093 - Statistics from a Large Sample

This problem asks us to compute several descriptive statistics-minimum, maximum, mean, median, and mode-from a very large sample of integers ranging from 0 to 255.

leetcodemediumarraymathprobability-and-statistics
LeetCode 932 - Beautiful Array

The problem asks us to construct a permutation of the integers from 1 to n such that the array satisfies a special condition.

leetcodemediumarraymathdivide-and-conquer
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
LeetCode 1714 - Sum Of Special Evenly-Spaced Elements In Array

The problem requires calculating sums of specific subsets of an integer array nums based on queries. Each query [xi, yi] specifies a starting index xi and a step yi. The sum for this query includes all elements nums[j] such that j starts at xi and increases in steps of yi (i.e.

leetcodehardarraydynamic-programming
LeetCode 244 - Shortest Word Distance II

This problem asks us to design a reusable data structure that can efficiently answer repeated shortest-distance queries between words in a fixed list of strings. We are given an array of words, wordsDict, during initialization.

leetcodemediumarrayhash-tabletwo-pointersstringdesign
LeetCode 159 - Longest Substring with At Most Two Distinct Characters

The problem asks us to find the length of the longest contiguous substring in a string s that contains at most two distinct characters. A substring is a continuous sequence of characters inside the original string.

leetcodemediumhash-tablestringsliding-window
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
LeetCode 1635 - Hopper Company Queries I

This problem asks us to generate monthly statistics for the year 2020 using information from three database tables: Driv

leetcodeharddatabase
LeetCode 271 - Encode and Decode Strings

The problem asks us to design a reversible encoding system for a list of strings. We need two functions: - encode, which converts a list of strings into a single string - decode, which reconstructs the original list from that encoded string The important requirement is that…

leetcodemediumarraystringdesign
LeetCode 476 - Number Complement

The problem asks us to compute the complement of a positive integer by flipping every bit in its binary representation. A binary complement means changing every 1 bit into 0, and every 0 bit into 1. For example, the integer 5 is represented in binary as 101.

leetcodeeasybit-manipulation
LeetCode 304 - Range Sum Query 2D - Immutable

The problem asks us to design a data structure that can efficiently answer multiple rectangular sum queries on a fixed 2D matrix.

leetcodemediumarraydesignmatrixprefix-sum
LeetCode 1116 - Print Zero Even Odd

The problem requires us to implement a multithreaded class ZeroEvenOdd that coordinates three separate threads to print numbers in a specific sequence. Thread A prints 0s, Thread B prints even numbers, and Thread C prints odd numbers.

leetcodemediumconcurrency
LeetCode 613 - Shortest Distance in a Line

This problem gives us a database table named Point that contains integer coordinates on the X-axis. Each row represents one point, and the column x is unique because it is the primary key. The task is to compute the smallest absolute distance between any two points in the table.

leetcodeeasydatabase
CF 85D - Sum of Medians

We are asked to maintain a dynamic set of positive integers under three operations: adding a number, deleting a number, and computing the sum of medians of every consecutive group of five elements after sorting the set.

codeforcescompetitive-programmingbinary-searchbrute-forcedata-structuresimplementation
LeetCode 1593 - Split a String Into the Max Number of Unique Substrings

This problem asks us to split a string into the largest possible number of substrings such that every substring is uniqu

leetcodemediumhash-tablestringbacktracking
LeetCode 893 - Groups of Special-Equivalent Strings

The problem asks us to group strings based on a special equivalence property. Specifically, two strings are special-equivalent if you can swap characters at even indices among themselves and characters at odd indices among themselves any number of times to make the two strings…

leetcodemediumarrayhash-tablestringsorting
LeetCode 1491 - Average Salary Excluding the Minimum and Maximum Salary

The problem gives us an array called salary, where each element represents the salary of an employee. Every salary value

leetcodeeasyarraysorting
LeetCode 1079 - Letter Tile Possibilities

The problem asks us to count all possible non-empty sequences that can be formed from a set of letter tiles, where each tile has a single uppercase letter. The input is a string tiles representing the letters available on the tiles.

leetcodemediumhash-tablestringbacktrackingcounting
CF 77E - Martian Food

We have a large circle, the plate, with radius R. Inside it there is another circle, the Golden Honduras, with radius r. The Honduras circle is tangent to the plate from the inside, so its center is exactly R - r units away from the plate center.

codeforcescompetitive-programminggeometry
LeetCode 1621 - Number of Sets of K Non-Overlapping Line Segments

This guide is quite large and highly detailed under your required structure, especially with full worked examples, both

leetcodemediummathdynamic-programmingcombinatoricsprefix-sum
LeetCode 937 - Reorder Data in Log Files

In this problem, we are given a list of log strings. Each log contains an identifier followed by one or more words separated by spaces. The first token is always the identifier, and everything after it represents the content of the log.

leetcodemediumarraystringsorting
LeetCode 1815 - Maximum Number of Groups Getting Fresh Donuts

This problem asks us to maximize the number of “happy” customer groups by choosing the best possible ordering of the groups. The donut shop produces donuts in batches of exactly batchSize. A fresh batch starts only when the previous batch has been completely consumed.

leetcodehardarraydynamic-programmingbit-manipulationmemoizationbitmask
LeetCode 1562 - Find Latest Group of Size M

Edit This problem gives us a permutation array arr containing integers from 1 to n, where n is the size of the binary st

leetcodemediumarrayhash-tablebinary-searchsimulation
LeetCode 1435 - Create a Session Bar Chart

The problem provides a database table named Sessions with two columns: | Column | Meaning | | --- | --- | | sessionid |

leetcodeeasydatabase
LeetCode 1134 - Armstrong Number

In this problem, we are given an integer n, and we must determine whether it is an Armstrong number. An Armstrong number is defined as follows: - Let k be the number of digits in n. - Take every digit in the number. - Raise each digit to the power k.

leetcodeeasymath
LeetCode 1309 - Decrypt String from Alphabet to Integer Mapping

The problem gives us a string containing digits and the '' character. This string encodes lowercase English letters usin

leetcodeeasystring
CF 101B - Buses

We have bus stops placed on a line from 0 to n. Gerald starts at stop 0 and wants to reach stop n. Each bus is described by an interval [s, t]. Gerald may board that bus at any stop from s through t - 1, but once he rides it, he must stay on until stop t.

codeforcescompetitive-programmingbinary-searchdata-structuresdp
LeetCode 328 - Odd Even Linked List

This problem asks us to reorder a singly linked list so that all nodes located at odd indices appear first, followed by all nodes located at even indices. The important detail is that the grouping is based on the node's position in the list, not the node's value.

leetcodemediumlinked-list
LeetCode 601 - Human Traffic of Stadium

The problem asks us to extract all consecutive records from a Stadium table where the people count is at least 100, and the consecutive streak has a length of three or more. Each row has a unique id and a corresponding visitdate.

leetcodeharddatabase
LeetCode 1722 - Minimize Hamming Distance After Swap Operations

The problem asks us to find the minimum Hamming distance between two arrays, source and target, after performing any number of swaps on source at positions allowed by allowedSwaps. The Hamming distance is defined as the number of indices i for which source[i] != target[i].

leetcodemediumarraydepth-first-searchunion-find
LeetCode 849 - Maximize Distance to Closest Person

In this problem, we are given a binary array called seats. Each position in the array represents a seat in a row: - 1 means the seat is occupied. - 0 means the seat is empty.

leetcodemediumarray
LeetCode 1468 - Calculate Salaries

This problem asks us to compute the post tax salary for every employee in the Salaries table. However, the tax rate is n

leetcodemediumdatabase
LeetCode 786 - K-th Smallest Prime Fraction

The problem asks us to find the k-th smallest fraction that can be formed by dividing one element of a sorted array arr by another element later in the array. The array arr is strictly increasing, starts with 1, and all elements after the first are prime numbers.

leetcodemediumarraytwo-pointersbinary-searchsortingheap-(priority-queue)
LeetCode 1011 - Capacity To Ship Packages Within D Days

This problem asks us to determine the minimum ship capacity required to transport all packages within a fixed number of days. We are given an array called weights, where weights[i] represents the weight of the i-th package on a conveyor belt.

leetcodemediumarraybinary-search
LeetCode 1662 - Check If Two String Arrays are Equivalent

The problem gives us two arrays of strings, word1 and word2. Each array represents a single larger string formed by conc

leetcodeeasyarraystring