brain

tamnd's digital brain — notes, problems, research

42641 notes

LeetCode 858 - Mirror Reflection

This problem describes a square room with perfectly reflective walls. The room has side length p, and there are three receptors placed at three corners of the square: - Receptor 0 is at the southeast corner - Receptor 1 is at the northeast corner - Receptor 2 is at the…

leetcodemediummathgeometrynumber-theory
CF 76D - Plus and xor

We are given two non-negative integers, A and B. We need to construct two other non-negative integers, X and Y, such that: - their sum equals A - their bitwise xor equals B Among all valid pairs, we must output the one with the smallest possible X.

codeforcescompetitive-programmingdpgreedymath
LeetCode 857 - Minimum Cost to Hire K Workers

In this problem, we are given two arrays, quality and wage, where each index represents a worker. The value quality[i] describes how much work or contribution the i-th worker provides, while wage[i] describes the minimum amount that worker is willing to accept.

leetcodehardarraygreedysortingheap-(priority-queue)
LeetCode 1228 - Missing Number In Arithmetic Progression

The problem asks us to find a missing value from an array that originally formed an arithmetic progression (AP). An arithmetic progression is a sequence where the difference between consecutive terms is constant, i.e., arr[i + 1] - arr[i] is the same for every consecutive pair.

leetcodeeasyarraymath
CF 9C - Hexadecimal's Numbers

We are asked to count how many numbers from 1 to n consist only of the digits 0 and 1 in their decimal representation. In other words, Hexadecimal's memory only stores numbers that, when written in base 10, contain no digits other than 0 or 1.

codeforcescompetitive-programmingbrute-forceimplementationmath
LeetCode 892 - Surface Area of 3D Shapes

The problem gives us an n x n matrix called grid, where each cell contains a non-negative integer. The value grid[i][j] represents how many 1 x 1 x 1 cubes are stacked vertically at position (i, j). Each cube contributes surface area through its exposed faces.

leetcodeeasyarraymathgeometrymatrix
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 1091 - Shortest Path in Binary Matrix

The problem asks us to find the shortest path from the top-left corner (0, 0) to the bottom-right corner (n-1, n-1) of a given n x n binary matrix grid. A cell with a value of 0 is passable, while a cell with a value of 1 is blocked.

leetcodemediumarraybreadth-first-searchmatrix
CF 93C - Azembler

We start with one register, eax, containing some unknown value x. Every other register contains 0. The goal is to produce n x in any register using the minimum possible number of lea instructions. The instruction set is surprisingly limited, but also surprisingly powerful.

codeforcescompetitive-programmingbrute-forceimplementation
LeetCode 170 - Two Sum III - Data structure design

The problem asks us to design a data structure that supports two operations efficiently over a stream of integers. The first operation, add(number), inserts a number into the data structure. Numbers may appear multiple times, so duplicates must be handled correctly.

leetcodeeasyarrayhash-tabletwo-pointersdesigndata-stream
LeetCode 1344 - Angle Between Hands of a Clock

This problem asks us to compute the smaller angle formed between the hour hand and the minute hand on a standard 12-hour

leetcodemediummath
CF 35D - Animals

We are asked to simulate a farm in which animals arrive one per day over n days. Each animal has a fixed daily food requirement starting from the day it arrives. The farm starts with X tons of food.

codeforcescompetitive-programmingdpgreedy
CF 120E - Put Knight!

We are asked to analyze a two-player game on an n × n chessboard. Petya and Gena take turns placing knights such that no knight can threaten another. A knight threatens positions in its standard L-shaped moves.

codeforcescompetitive-programminggamesmath
LeetCode 591 - Tag Validator

This problem asks us to validate whether a given string represents a correctly structured code snippet according to a custom XML-like syntax. At first glance, it resembles parsing HTML or XML tags, but the validation rules are stricter and more specialized.

leetcodehardstringstack
LeetCode 666 - Path Sum IV

This problem encodes a binary tree into a compact array of three-digit integers. Each integer stores three pieces of information: - The hundreds digit represents the depth of the node. - The tens digit represents the node's position within that depth level.

leetcodemediumarrayhash-tabletreedepth-first-searchbinary-tree
LeetCode 256 - Paint House

The problem gives us a row of houses, where each house must be painted using exactly one of three colors: red, blue, or green. The input is provided as a two-dimensional array named costs, where costs[i][j] represents the cost of painting the i-th house with the j-th color.

leetcodemediumarraydynamic-programming
LeetCode 949 - Largest Time for Given Digits

The problem provides an array of exactly four digits. Using each digit exactly once, we must construct the latest possible valid 24-hour time in the format "HH:MM".

leetcodemediumarraystringbacktrackingenumeration
LeetCode 156 - Binary Tree Upside Down

The problem asks us to transform a binary tree into its "upside-down" version. In more precise terms, we are given a binary tree where every right node either has a left sibling or is absent, and no right node has children.

leetcodemediumtreedepth-first-searchbinary-tree
LeetCode 1290 - Convert Binary Number in a Linked List to Integer

The problem gives us the head of a singly linked list where every node contains either 0 or 1. These values together rep

leetcodeeasylinked-listmath
LeetCode 1440 - Evaluate Boolean Expression

This problem asks us to evaluate boolean expressions stored in a database table. We are given two tables: Variables, whi

leetcodemediumdatabase
LeetCode 429 - N-ary Tree Level Order Traversal

The problem asks us to perform a level order traversal of an n-ary tree. In other words, we need to return the values of the tree nodes grouped by their depth. The root node represents level 0, its immediate children are level 1, their children are level 2, and so on.

leetcodemediumtreebreadth-first-search
CF 118D - Caesar's Legions

We are asked to count the number of ways to line up Caesar’s soldiers, consisting of a given number of footmen and horsemen, so that no more than a fixed number of the same type stand consecutively.

codeforcescompetitive-programmingdp
LeetCode 1818 - Minimum Absolute Sum Difference

The problem gives two arrays of positive integers, nums1 and nums2, both of equal length n. The goal is to calculate the absolute sum difference between these arrays, which is the sum of the absolute differences at each index: |nums1[i] - nums2[i]|.

leetcodemediumarraybinary-searchsortingordered-set
LeetCode 1536 - Minimum Swaps to Arrange a Binary Grid

The problem gives us an n x n binary matrix called grid. Each cell contains either 0 or 1. We are allowed to perform operations where we swap two adjacent rows. The goal is to transform the matrix into a valid configuration using the minimum number of adjacent row swaps.

leetcodemediumarraygreedymatrix
CF 44I - Toys

We are asked to enumerate all ways to split n toys into piles, starting from a single pile containing all toys. The toys are numbered from 1 to n, and the order within a pile or between piles does not matter for uniqueness beyond the actual grouping.

codeforcescompetitive-programmingbrute-forcecombinatorics
LeetCode 1016 - Binary String With Substrings Representing 1 To N

The problem asks us to determine whether a given binary string s contains all binary representations of integers from 1 to n as substrings.

leetcodemediumhash-tablestringbit-manipulationsliding-window
CF 21A - Jabber ID

We need to validate whether a string follows the exact syntax of a Jabber ID.

codeforcescompetitive-programmingimplementationstrings
LeetCode 453 - Minimum Moves to Equal Array Elements

The problem gives an integer array nums with n elements. In a single move, you are allowed to increment exactly n - 1 elements by 1. Your goal is to determine the minimum number of such moves required to make every element in the array equal.

leetcodemediumarraymath
LeetCode 10 - Regular Expression Matching

LeetCode 10, Regular Expression Matching, asks us to determine whether an entire input string s matches a pattern p. The pattern supports two special regular expression characters: - .

leetcodehardstringdynamic-programmingrecursion
LeetCode 370 - Range Addition

The problem gives us an initially zero-filled array of size length. We are also given a list of update operations, where each update has the form: This means we must add inc to every element in the inclusive range from startIdx to endIdx.

leetcodemediumarrayprefix-sum
LeetCode 1308 - Running Total for Different Genders

The problem is asking us to compute cumulative scores for each gender across different days in a competition. The input

leetcodemediumdatabase
LeetCode 1037 - Valid Boomerang

This problem asks us to determine whether three given points in a 2D Cartesian plane form a valid boomerang. A boomerang is defined as a set of three points that are all distinct and not in a straight line. In other words, the points must not coincide and must not be collinear.

leetcodeeasyarraymathgeometry
CF 119E - Alternative Reality

We are given a three-dimensional space containing $n$ fixed points, representing the centers of energy spheres. There are $m$ levels, and in each level the player starts at a plane passing through the origin.

codeforcescompetitive-programminggeometry
LeetCode 1796 - Second Largest Digit in a String

The problem gives us a string s that contains lowercase English letters and numerical digits. Our task is to find the second largest distinct digit that appears anywhere in the string. The important detail is that we care about distinct digits, not frequency.

leetcodeeasyhash-tablestring
CF 53C - Little Frog

We have n mounds placed on a straight line at positions 1, 2, ..., n. The frog wants to visit every mound exactly once, so we must output a permutation of these positions.

codeforcescompetitive-programmingconstructive-algorithms
LeetCode 232 - Implement Queue using Stacks

The problem asks us to implement a queue using only stack operations. A queue follows the FIFO, First In First Out, principle. The first element inserted into the queue must be the first element removed.

leetcodeeasystackdesignqueue
CF 54A - Presents

We are asked to estimate the minimum number of presents the Hedgehog will receive over the next N days. He has two rules governing present reception: every holiday he receives a gift, and he cannot go more than K days without receiving one.

codeforcescompetitive-programmingimplementation
LeetCode 418 - Sentence Screen Fitting

The problem gives us a screen with a fixed number of rows and cols, along with a sentence represented as an array of words. We need to determine how many complete times the sentence can be written on the screen while following strict formatting rules.

leetcodemediumarraystringdynamic-programming
LeetCode 819 - Most Common Word

The problem asks us to process a paragraph of text and determine which word appears most frequently, while ignoring a given list of banned words. The final answer must be returned in lowercase.

leetcodeeasyarrayhash-tablestringcounting
LeetCode 889 - Construct Binary Tree from Preorder and Postorder Traversal

The problem gives us two traversal orders of the same binary tree: - preorder, which visits nodes in the order: root → left subtree → right subtree - postorder, which visits nodes in the order: left subtree → right subtree → root Our task is to reconstruct and return the…

leetcodemediumarrayhash-tabledivide-and-conquertreebinary-tree
LeetCode 1523 - Count Odd Numbers in an Interval Range

The problem gives two non-negative integers, low and high, representing the inclusive bounds of an interval. We need to

leetcodeeasymath
CF 19E - Fairy

We are given an undirected graph. Each edge represents a segment drawn between two points. We may erase exactly one edge, and after removing it we want the remaining graph to become bipartite.

codeforcescompetitive-programmingdfs-and-similardivide-and-conquerdsu
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
CF 79A - Bus Game

We are asked to simulate a turn-based game involving two players, Ciel and Hanako, who alternate taking coins from a common pile. The pile initially contains x 100-yen coins and y 10-yen coins. On each turn, the active player must remove exactly 220 yen.

codeforcescompetitive-programminggreedy
LeetCode 679 - 24 Game

The problem is asking us to determine whether it is possible to use exactly four numbers, each between 1 and 9 inclusive, to form a mathematical expression that evaluates to exactly 24. The numbers are given in an array called cards of length 4.

leetcodehardarraymathbacktracking
CF 101C - Vectors

We start with a vector A = (x1, y1) and want to transform it into another vector B = (x2, y2). Two operations are allowed. We may rotate the current vector by 90 degrees clockwise, and we may add vector C = (x3, y3) any number of times. The operations may be mixed in any order.

codeforcescompetitive-programmingimplementationmath
LeetCode 390 - Elimination Game

The problem gives us a sorted list containing every integer from 1 to n. We repeatedly eliminate numbers in alternating directions until only one number remains.

leetcodemediummathrecursion
LeetCode 1823 - Find the Winner of the Circular Game

The problem describes a variation of the classic Josephus problem. We have n friends sitting in a circle, numbered 1 through n clockwise. Starting from the first friend, we count k friends clockwise (inclusive of the starting friend).

leetcodemediumarraymathrecursionqueuesimulation
CF 16B - Burglar and Matches

We have a burglar who can carry exactly n matchboxes. In the warehouse, there are m containers. Each container i has a_i matchboxes, and every matchbox in that container contains b_i matches.

codeforcescompetitive-programminggreedyimplementationsortings
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 582 - Kill Process

This problem models processes in an operating system as a tree structure. Every process has exactly one parent, except for the root process, which has no parent and is identified by ppid[i] = 0.

leetcodemediumarrayhash-tabletreedepth-first-searchbreadth-first-search
LeetCode 1120 - Maximum Average Subtree

This problem asks us to find the maximum average value among all subtrees of a given binary tree. A subtree is defined as any node along with all of its descendants. The average of a subtree is the sum of its node values divided by the number of nodes in that subtree.

leetcodemediumtreedepth-first-searchbinary-tree
LeetCode 1402 - Reducing Dishes

In this problem, we are given an integer array called satisfaction, where each element represents the satisfaction level

leetcodehardarraydynamic-programminggreedysorting
LeetCode 1222 - Queens That Can Attack the King

In this problem, we are given the positions of several black queens and exactly one white king on a standard 8 x 8 chessboard. The board uses 0-indexed coordinates, meaning every position is represented as [row, column], where both values range from 0 to 7.

leetcodemediumarraymatrixsimulation
LeetCode 1553 - Minimum Number of Days to Eat N Oranges

This problem asks us to compute the minimum number of days required to eat exactly n oranges, given three possible actions that can be performed each day. On any single day, we may choose one of the following operations: 1. Eat exactly one orange. 2.

leetcodeharddynamic-programmingmemoization
CF 78D - Archer's Shot

We are asked to calculate how many hexagonal cells a single archer can fully cover with a circular attack of radius k, where the archer is positioned at the center of a cell. Each hexagon has side length 1.

codeforcescompetitive-programmingbinary-searchgeometrymathtwo-pointers
LeetCode 1824 - Minimum Sideway Jumps

This problem describes a frog navigating a 3-lane road of length n. The frog starts at point 0 in lane 2 and wants to reach point n. Each point along the road may have at most one obstacle in one of the three lanes, represented by the obstacles array.

leetcodemediumarraydynamic-programminggreedy
CF 117D - Not Quick Transformation

We start with the array [1, 2, 3, ..., n]. A recursive transformation rearranges it by repeatedly taking all elements at odd positions, transforming that subarray, then taking all elements at even positions and transforming that subarray.

codeforcescompetitive-programmingdivide-and-conquermath
CF 24D - Broken robot

The board has N rows and M columns. A robot starts at cell (i, j) and repeatedly performs one random move. From an interior cell it has four equally likely choices: stay in place, move left, move right, or move down.

codeforcescompetitive-programmingdpmathprobabilities
LeetCode 1390 - Four Divisors

The problem asks us to calculate the sum of divisors for numbers in a given integer array nums, but only for those numbe

leetcodemediumarraymath
LeetCode 1778 - Shortest Path in a Hidden Grid

This problem asks us to find the shortest path from a robot's unknown starting position to a hidden target inside a grid. The major challenge is that the grid itself is not directly accessible.

leetcodemediumarraydepth-first-searchbreadth-first-searchmatrixinteractive
LeetCode 1110 - Delete Nodes And Return Forest

This problem gives us the root of a binary tree and a list of node values that must be deleted from the tree. Every node value in the tree is unique, which is important because it means we can identify nodes directly by value without ambiguity.

leetcodemediumarrayhash-tabletreedepth-first-searchbinary-tree
LeetCode 546 - Remove Boxes

The problem gives us an array called boxes, where each integer represents the color of a box. We may repeatedly remove groups of adjacent boxes that share the same color. If we remove a group containing k boxes, we earn k k points.

leetcodehardarraydynamic-programmingmemoization
LeetCode 1610 - Maximum Number of Visible Points

In this problem, we are standing at a fixed position on a 2D plane, represented by location = [posx, posy]. Around us, there are multiple points, each with integer coordinates. We are allowed to rotate in place, but we cannot move.

leetcodehardarraymathgeometrysliding-windowsorting
LeetCode 1810 - Minimum Path Cost in a Hidden Grid

This problem is an interactive shortest path problem on a hidden weighted grid. We control a robot that starts somewhere in an unknown grid, and we must determine the minimum total movement cost required to reach a hidden target cell.

leetcodemediumarraydepth-first-searchbreadth-first-searchgraph-theoryheap-(priority-queue)matrixinteractiveshortest-path
LeetCode 1021 - Remove Outermost Parentheses

Unusual activity has been detected from your device. Try again later. (36c3723c-3fa3-4b63-a514-20d2635d5e47)

leetcodeeasystringstack
LeetCode 1785 - Minimum Elements to Add to Form a Given Sum

The problem gives us an integer array nums, a maximum allowed absolute value limit, and a target sum called goal.

leetcodemediumarraygreedy
CF 100C - A+B

The task looks trivial at first glance: read two integers and print their sum. The catch is hidden inside the constraints. Each number can contain up to 500 decimal digits, far larger than the range of standard 32-bit or 64-bit integers in many languages.

codeforcescompetitive-programming*specialimplementation
LeetCode 1104 - Path In Zigzag Labelled Binary Tree

This problem describes an infinite binary tree where nodes are normally arranged level by level, but with a twist in how labels are assigned. In a standard binary tree, nodes in each level are labeled from left to right.

leetcodemediummathtreebinary-tree
LeetCode 431 - Encode N-ary Tree to Binary Tree

This problem asks us to design a reversible transformation between two different tree structures: - An N-ary tree, where each node can have any number of children - A binary tree, where each node has at most two children The important requirement is not how the encoding looks…

leetcodehardtreedepth-first-searchbreadth-first-searchdesignbinary-tree
LeetCode 1726 - Tuple with Same Product

The problem asks us to count all tuples (a, b, c, d) from a given array of distinct positive integers such that the product of the first two elements equals the product of the second two elements, a b = c d, and all elements are distinct.

leetcodemediumarrayhash-tablecounting
CF 68A - Irrational problem

We are asked to count integers $x$ in a given range $[a, b]$ that satisfy a certain remainder-based property. Petya has four distinct integers $p1, p2, p3, p4$.

codeforcescompetitive-programmingimplementationnumber-theory
CF 128E - Birthday

We are asked to determine the maximum number of banana pieces Maria can produce from a birthday cake decorated with n non-overlapping circular banana pieces using exactly k straight-line cuts. Each circle has a center coordinate (x, y) and a radius r.

codeforcescompetitive-programminggeometrymath
LeetCode 231 - Power of Two

The problem asks us to determine whether a given integer n is a power of two. A number is considered a power of two if it can be written in the form: where x is a non-negative integer.

leetcodeeasymathbit-manipulationrecursion
LeetCode 561 - Array Partition

The problem gives an array nums containing 2n integers. Our task is to divide these integers into exactly n pairs. For each pair (ai, bi), we take the smaller value, min(ai, bi). After computing the minimum value from every pair, we sum all of those minimums together.

leetcodeeasyarraygreedysortingcounting-sort
LeetCode 568 - Maximum Vacation Days

This problem asks us to maximize the total number of vacation days over k weeks while traveling between n cities under specific flight constraints. We start in city 0 on the Monday morning of week 0.

leetcodehardarraydynamic-programmingmatrix
CF 64D - Presents

We are given three positive integers representing the prices of three presents. There are three sisters, ranked by age: eldest, middle, and youngest.

codeforcescompetitive-programming*specialgreedy
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 1672 - Richest Customer Wealth

This problem gives us a two dimensional integer array called accounts. Each row represents a customer, and each column represents one of that customer's bank accounts. The value accounts[i][j] represents how much money the i-th customer has in the j-th bank account.

leetcodeeasyarraymatrix
LeetCode 710 - Random Pick with Blacklist

The problem asks us to design a data structure that can repeatedly return a random integer from the range [0, n - 1], while excluding all integers that appear in a blacklist. Every valid number must have exactly the same probability of being chosen.

leetcodehardarrayhash-tablemathbinary-searchsortingrandomized
LeetCode 1538 - Guess the Majority in a Hidden Array

This problem is an interactive problem. We do not receive the actual binary array directly. Instead, we can only gather information through the ArrayReader API. The hidden array nums contains only 0 and 1.

leetcodemediumarraymathinteractive
LeetCode 1582 - Special Positions in a Binary Matrix

Here is a complete, detailed technical solution guide for LeetCode 1582 - Special Positions in a Binary Matrix, followin

leetcodeeasyarraymatrix
CF 6A - Triangle

We are given four stick lengths, and we must choose exactly three of them. Depending on the relationship between those three lengths, there are three possible outcomes.

codeforcescompetitive-programmingbrute-forcegeometry
LeetCode 19 - Remove Nth Node From End of List

This problem asks us to remove the nth node counted from the end of a singly linked list and return the modified list. A singly linked list is a sequence of nodes where each node contains a value and a pointer to the next node.

leetcodemediumlinked-listtwo-pointers
LeetCode 1463 - Cherry Pickup II

Here is a complete, detailed technical solution guide for LeetCode 1463 - Cherry Pickup II following your formatting req

leetcodehardarraydynamic-programmingmatrix
LeetCode 1388 - Pizza With 3n Slices

In this problem, we are given a circular pizza divided into 3n slices. Each slice has a size represented by the array sl

leetcodehardarraydynamic-programminggreedyheap-(priority-queue)
LeetCode 1018 - Binary Prefix Divisible By 5

The problem presents a binary array nums, where each element is either 0 or 1. We are asked to compute the sequence of numbers formed by interpreting the subarray nums[0..i] as a binary number, denoted as xi.

leetcodeeasyarraybit-manipulation
LeetCode 695 - Max Area of Island

The problem is asking us to find the largest connected area of land in a 2D binary matrix. Each cell in the matrix represents either water (0) or land (1). A group of 1s forms an island if the 1s are connected 4-directionally (up, down, left, or right).

leetcodemediumarraydepth-first-searchbreadth-first-searchunion-findmatrix
CF 137A - Postcards and photos

We are given a string made of two characters, C and P. Each character represents one object hanging on the wall. C means postcard, P means photo. Polycarpus removes objects from left to right. He cannot skip positions, and at any moment he may carry only one type of object.

codeforcescompetitive-programmingimplementation
LeetCode 1441 - Build an Array With Stack Operations

The problem gives us a strictly increasing array called target and an integer n. We are also given access to a stream of integers starting from 1 and ending at n. The numbers arrive in order, and once a number is skipped, we cannot go back to it.

leetcodemediumarraystacksimulation
LeetCode 745 - Prefix and Suffix Search

The problem asks us to design a data structure that supports efficient searches based on both a prefix and a suffix. We are given an array of words, where each word has an implicit index based on its position in the array. The WordFilter class must support two operations: 1.

leetcodehardarrayhash-tablestringdesigntrie
LeetCode 1151 - Minimum Swaps to Group All 1's Together

This problem asks us to determine the minimum number of swaps needed to group all 1s in a binary array into one contiguous block. The block can appear anywhere in the array, as long as all 1s end up adjacent.

leetcodemediumarraysliding-window
LeetCode 831 - Masking Personal Information

The problem requires creating a masked version of a personal information string s that can either be an email address or a phone number. The goal is to obscure sensitive information while keeping enough data to identify the user minimally.

leetcodemediumstring
LeetCode 26 - Remove Duplicates from Sorted Array

The problem gives us a sorted integer array nums in non-decreasing order. Because the array is already sorted, any duplicate values will always appear next to each other.

leetcodeeasyarraytwo-pointers
CF 37E - Trial for Chief

We are given a rectangular slab divided into an grid of squares. Each square is either black or white in the final design, which is provided as input. The slab initially starts entirely white.

codeforcescompetitive-programminggraphsgreedyshortest-paths
LeetCode 1266 - Minimum Time Visiting All Points

The problem gives a sequence of points on a 2D coordinate plane. Each point is represented as [x, y], where x and y are

leetcodeeasyarraymathgeometry
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 716 - Max Stack

The problem asks us to design a stack data structure, MaxStack, which behaves like a normal stack with additional operations for efficiently accessing and removing the maximum element.

leetcodehardlinked-liststackdesigndoubly-linked-listordered-set
CF 26E - Multithreading

Each process repeatedly executes two atomic instructions:

codeforcescompetitive-programmingconstructive-algorithms
LeetCode 1137 - N-th Tribonacci Number

The problem asks us to compute the n-th number in the Tribonacci sequence. The Tribonacci sequence is very similar to the Fibonacci sequence, except that instead of summing the previous two numbers, each value is formed by summing the previous three numbers.

leetcodeeasymathdynamic-programmingmemoization