All Posts
Leetcode 2293: Min Max Game
You are given an integer array nums where the length of the array is a power of 2. The task is to apply a repeated algorithm to reduce the array size. In each iteration, if the index of an element is even, the new value at that index will be the minimum of two adjacent elements; if the index is odd, the new value will be the maximum. The process continues until only one element remains, which is the result.
Leetcode 2299: Strong Password Checker II
A strong password is defined by the following criteria:
- It must contain at least 8 characters.
- It must have at least one lowercase letter.
- It must have at least one uppercase letter.
- It must have at least one digit.
- It must have at least one special character from the set: ‘!@#$%^&*()-+’.
- It cannot contain two consecutive identical characters.
Given a string
password
, returntrue
if the password satisfies all these conditions. Otherwise, returnfalse
.