Home
Atelier Chikuma
Cancel

Leetcode 227 - Basic Calculator II

Link to problem Description Given a string s which represents an expression, evaluate this expression and return its value. The integer division should truncate toward zero. You may assume that...

Leetcode 129 - Sum Root to Leaf Numbers

Link to problem Description You are given the root of a binary tree containing digits from 0 to 9 only. Each root-to-leaf path in the tree represents a number. For example, the root-to-leaf ...

Leetcode 1146 - Snapshot Array

Link to problem Description Implement a SnapshotArray that supports the following interface: SnapshotArray(int length) initializes an array-like data structure with the given length. Initiall...

Leetcode 2549 - Minimum Time to Repair Cars

Link to problem Description You are given an integer array ranks representing the ranks of some mechanics. ranks$_\text{i}$ is the rank of the i$^\text{th}$ mechanic. A mechanic with a rank r can...

Leetcode 2266 - Relocate Marbles

Link to problem Description You are given a 0-indexed integer array nums representing the initial positions of some marbles. You are also given two 0-indexed integer arrays moveFrom and moveTo of...

Leetcode 1995 - Count Special Quadruplets

Link to problem Description Given a 0-indexed integer array nums, return the number of distinct quadruplets (a, b, c, d) such that: nums[a] + nums[b] + nums[c] == nums[d], and a < b <...

Leetcode 2265 - Count Nodes Equal to Average of Subtree

Link to problem Description Given the root of a binary tree, return the number of nodes where the value of the node is equal to the average of the values in its subtree. Note: The average of ...

Leetcode 121 - Best Time to Buy and Sell Stock

Link to problem Description You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock...

Leetcode 123 - Best Time to Buy and Sell Stock III

Link to problem Description You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. You may complete at most two tran...

Leetcode 1865 - Finding Pairs With a Certain Sum

Link to problem Problem You are given two integer arrays nums1 and nums2. You are tasked to implement a data structure that supports queries of two types: Add a positive integer to an element...