All Posts

Leetcode 698: Partition to K Equal Sum Subsets

Given an integer array nums and an integer k, your task is to determine if it is possible to divide this array into k non-empty subsets such that each subset has an equal sum.

Leetcode 707: Design Linked List

Design a custom linked list that supports multiple operations. You can choose to implement it using a singly or doubly linked list. Implement the following methods in the MyLinkedList class:

Leetcode 712: Minimum ASCII Delete Sum for Two Strings

Given two strings s1 and s2, return the lowest ASCII sum of deleted characters to make the two strings equal.

Leetcode 713: Subarray Product Less Than K

Given an array of integers nums and an integer k, return the number of contiguous subarrays where the product of all the elements in the subarray is strictly less than k.

Leetcode 714: Best Time to Buy and Sell Stock with Transaction Fee

You are given an array prices where prices[i] represents the price of a stock on the i-th day, and an integer fee that represents a transaction fee for each transaction. The task is to calculate the maximum profit you can achieve. You may complete as many transactions as you like, but you need to pay the transaction fee for each transaction.

Leetcode 718: Maximum Length of Repeated Subarray

Given two integer arrays nums1 and nums2, your task is to find the maximum length of a contiguous subarray that appears in both arrays.