CNoodle
  • Home
  • Archives
  • Tags
  • About

[LeetCode] 1716. Calculate Money in Leetcode Bank

Hercy wants to save money for his first car. He puts money in the Leetcode bank every day. He starts by putting in $1 on Monday, the first day. Every day from Tuesday to Sunday, he will put in $1 more
2023-12-06
#leetcode #java #math

[LeetCode] 1688. Count of Matches in Tournament

You are given an integer n, the number of teams in a tournament that has strange rules:If the current number of teams is even, each team gets paired with another team. A total of n / 2 matches ar
2023-12-05
#leetcode #java #math #simulation

[LeetCode] 2264. Largest 3-Same-Digit Number in String

You are given a string num representing a large integer. An integer is good if it meets the following conditions:It is a substring of num with length 3.It consists of only one unique digit.Return the
2023-12-04
#leetcode #java #string

[LeetCode] 1266. Minimum Time Visiting All Points

On a 2D plane, there are n points with integer coordinates points[i] = [xi, yi]. Return the minimum time in seconds to visit all the points in the order given by points. You can move according to
2023-12-03
#leetcode #java #math

[LeetCode] 1160. Find Words That Can Be Formed by Characters

You are given an array of strings words and a string chars. A string is good if it can be formed by characters from chars (each character can only be used once). Return the sum of lengths of all good
2023-12-02
#leetcode #java #hashmap #string

[LeetCode] 2661. First Completely Painted Row or Column

You are given a 0-indexed integer array arr, and an m x n integer matrix mat. arr and mat both contain all the integers in the range [1, m * n]. Go through each index i in arr starting from index 0 an
2023-11-30
#leetcode #java #array #hashmap

[LeetCode] 1727. Largest Submatrix With Rearrangements

You are given a binary matrix matrix of size m x n, and you are allowed to rearrange the columns of the matrix in any order. Return the area of the largest submatrix within matrix where every element
2023-11-29
#leetcode #java #array #greedy #sort #matrix

[LeetCode] 1685. Sum of Absolute Differences in a Sorted Array

You are given an integer array nums sorted in non-decreasing order. Build and return an integer array result with the same length as nums such that result[i] is equal to the summation of absolute diff
2023-11-25
#leetcode #array #prefix sum #math

[LeetCode] 1424. Diagonal Traverse II

Given a 2D integer array nums, return all elements of nums in diagonal order as shown in the below images. Example 1:Input: nums = [[1,2,3],[4,5,6],[7,8,9]]Output: [1,4,2,7,5,3,8,6,9] Example 2:I
2023-11-24
#leetcode #java #array #sort #matrix

[LeetCode] 1630. Arithmetic Subarrays

A sequence of numbers is called arithmetic if it consists of at least two elements, and the difference between every two consecutive elements is the same. More formally, a sequence s is arithmetic if
2023-11-23
#leetcode #java #array #sort
1…1213141516…44

Search

Hexo Fluid