1796. Second Largest Digit in a String

作者:sryan 更新时间:2023-03-23 16:37 分类:数据结构与算法

Given an alphanumeric string s, return the second largest numerical digit that appears in s, or -1 i...

点击数:210 回复数:0

1791. Find Center of Star Graph

作者:sryan 更新时间:2023-03-23 16:06 分类:数据结构与算法

There is an undirected star graph consisting of n nodes labeled from 1 to n. A star graph is a graph...

点击数:214 回复数:0

1790. Check if One String Swap Can Make Strings Equal

作者:sryan 更新时间:2023-03-23 15:53 分类:数据结构与算法

You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose ...

点击数:206 回复数:0


作者:sryan 更新时间:2022-08-03 18:07 分类:数据结构与算法

很久没写笔记了,感觉自己都躺平了,最近在实现一个模块,特性是读请求的占比会比写请求高很多,简而言之呢就是读多写少的场景。 解决方案其实很多,最简单的,直接加一把锁,但是无论是普通锁还是读写锁,万一有写...

点击数:531 回复数:0

4. Median of Two Sorted Arrays

作者:sryan 更新时间:2021-03-25 16:56 分类:数据结构与算法

Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two s...

点击数:687 回复数:0

509. Fibonacci Number

作者:sryan 更新时间:2021-03-25 15:13 分类:数据结构与算法

The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such th...

点击数:630 回复数:1

842. Split Array into Fibonacci Sequence

作者:sryan 更新时间:2021-03-25 15:06 分类:数据结构与算法

Given a string S of digits, such as S = "123456579", we can split it into a Fibonacci-like...

点击数:564 回复数:0

306. Additive Number

作者:sryan 更新时间:2021-03-25 14:48 分类:数据结构与算法

Additive number is a string whose digits can form additive sequence. A valid additive sequence shoul...

点击数:580 回复数:0

73. Set Matrix Zeroes

作者:sryan 更新时间:2021-03-25 13:47 分类:数据结构与算法

Given an m x n matrix. If an element is 0, set its entire row and column to 0. Do it in-place. Follo...

点击数:504 回复数:0

289. Game of Life

作者:sryan 更新时间:2021-03-25 10:51 分类:数据结构与算法

According to Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular a...

点击数:442 回复数:0