leetcode-potd

567. Permutation in String

leetcode-potd

Given two strings s1 and s2, return true if s2 contains a  permutation of s1, or false otherwise. In other words, return true if one of s1‘s permutations is the substring of s2. Example 1: […]

1590. Make Sum Divisible by P

leetcode-potd

Given an array of positive integers nums, remove the smallest subarray (possibly empty) such that the sum of the remaining elements is divisible by p. It is not allowed

641. Design Circular Deque

leetcode-potd

Design your implementation of the circular double-ended queue (deque). Implement the MyCircularDeque class: MyCircularDeque(int k) Initializes the deque with a maximum size of k.

2416. Sum of Prefix Scores of Strings

leetcode-potd

You are given an array words of size n consisting of non-empty strings. We define the score of a string word as the number of strings words[i] such that word is a prefix of words[i]. For example, if words =

Scroll to Top