Home
Atelier Chikuma
Cancel

Leetcode 1759 - Count Number of Homogenous Substrings

Link to problem Description Given a string s, return the number of homogenous substrings of s. Since the answer may be too large, return it modulo $10^9 + 7$. A string is homogenous if all the c...

Leetcode 2130 - Maximum Twin Sum of a Linked List

Link to problem Description In a linked list of size n, where n is even, the ith node (0-indexed) of the linked list is known as the twin of the (n-1-i)th node, if 0 <= i <= (n / 2) - 1. ...

Leetcode 11 - Container With Most Water

Link to problem Description You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find tw...

Leetcode 516 - Longest Palindromic Subsequence

Link to problem Description Given a string s, find the longest palindromic subsequence’s length in s. A subsequence is a sequence that can be derived from another sequence by deleting some or no...

Leetcode 1143 - Longest Common Subsequence

Link to problem Description Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0. A subsequence of a string is a ...

Leetcode 2909 - Minimum Sum of Mountain Triplets II

Link to problem Also check here Description You are given a 0-indexed array nums of integers. A triplet of indices (i, j, k) is a mountain if: i < j < k nums[i] < nums[j] and nums...

Leetcode 215 - Kth Largest Element in an Array

Link to problem Description Given an integer array nums and an integer k, return the kth, largest element in the array. Note that it is the kth largest element in the sorted order, not the kth d...

Leetcode 724 - Find Pivot Index

Link to problem Description Given an array of integers nums, calculate the pivot index of this array. The pivot index is the index where the sum of all the numbers strictly to the left of the in...

Leetcode 2095 - Delete the Middle Node of a Linked List

Link to problem Description You are given the head of a linked list. Delete the middle node, and return the head of the modified linked list. The middle node of a linked list of size n is the ⌊n...

Leetcode 238 - Product of Array Except Self

Link to problem Description Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix ...