Given an alphanumeric string s, return the second largest numerical digit that appears in s, or -1 i...
There is an undirected star graph consisting of n nodes labeled from 1 to n. A star graph is a graph...
You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose ...
很久没写笔记了,感觉自己都躺平了,最近在实现一个模块,特性是读请求的占比会比写请求高很多,简而言之呢就是读多写少的场景。 解决方案其实很多,最简单的,直接加一把锁,但是无论是普通锁还是读写锁,万一有写...
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two s...
The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such th...
Given a string S of digits, such as S = "123456579", we can split it into a Fibonacci-like...
Additive number is a string whose digits can form additive sequence. A valid additive sequence shoul...
Given an m x n matrix. If an element is 0, set its entire row and column to 0. Do it in-place. Follo...
According to Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular a...