摘要:
Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Example 1: Note 阅读全文
阅读排行榜
[LeetCode] 322. Coin Change_Medium tag: backpack
2019-07-06 00:49 by Johnson_强生仔仔, 249 阅读, 收藏,
摘要:
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you nee 阅读全文
[LeetCode] 115. Distinct Subsequences_ Hard tag: Dynamic Programming
2019-04-28 11:21 by Johnson_强生仔仔, 249 阅读, 收藏,
摘要:
Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string which is for 阅读全文
[LeetCode] 51. N-Queens_Hard tag: DFS, backtracking
2019-05-24 10:22 by Johnson_强生仔仔, 248 阅读, 收藏,
摘要:
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all 阅读全文
[LeetCode] 643. Maximum Average Subarray I_Easy tag: Dynamic Programming(Sliding windows)
2018-08-18 12:38 by Johnson_强生仔仔, 247 阅读, 收藏,
摘要:
Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the 阅读全文
浙公网安备 33010602011771号