当golang程序在运行过程中消耗了超出预期内存时,需要搞明白,到底是程序中哪些代码导致了这些内存消耗。此时,通常可以采用golang的pprof来分析golang进程的内存使用。 置顶! golang 内存分析/内存泄漏 golang
gctrace主要是用于跟踪GC的不同阶段的耗时与GC前后的内存量对比。可以用于对runtime本身进行调试之外,还可以观察线上应用的GC情况。 置顶! golang gctrace分析gc过程 golang
Given an m x n grid of characters board and a string word, return true if word exists in the grid. 79. 单词搜索 leetcode
A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null.Construct a deep copy of the list. 138. Copy List with Random Pointer leetcode
Given two strings text1 and text2, return common subsequence. If there is no common subsequence, return 0. 1143. Longest Common Subsequence dp
You want to schedule a list of jobs in d days. Jobs are dependent (i.e To work on the i-th job, you have to finish all the jobs j where 0 <= j < i). 1335. Minimum Difficulty of a Job Schedule leetcode
Given an m x n matrix. If an element is 0, set its entire row and column to 0. Do it in-place. 73. Set Matrix Zeroes leetcode
最近处理的单据业务经常会因为接口不幂等导致数据出错的情况。所以幂等性在设计系统的时候一定要考虑进去,尤其是像支付宝、银行、互联网金融公司等涉及的都是钱的系统,既要高效,也要准确,所以不能出现多扣款、多打款等问题,不然这样会很难处理,用户体验也不会好。 接口实现幂等的几种方式 系统设计
Return True if the path crosses itself at any point, that is, if at any time you are on a location you've previously visited. Return False otherwise. 1496. Path Crossing leetcode
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. 680. Valid Palindrome II leetcode
正则表达式(regular expression)描述了一种字符串匹配的模式(pattern),可以用来检查一个串是否含有某种子串、将匹配的子串替换或者从某个串中取出符合某个条件的子串等。 正则表达式 utility