herrDeng網內搜尋

自訂搜尋

Ads

2024年2月4日 星期日

C++ sliding window頻率計數陣列解Leetcode難題76 Minimum Window Substring打敗100趴


C++ sliding window頻率計數陣列解Leetcode難題76  Minimum Window Substring打敗100趴
難題Leetcode 76. Minimum Window Substring半年前就解出來了,不過解法不好,保持主要sliding window的架構,把unordered_map換成C int array,用點bitmask 就64個元素的陣列,先用C++,再用python於是100趴的code就成形了
===
The problem Leetcode 76. Minimum Window Substring was solved half a year ago, but the solution is not good. Keep the structure of  sliding window, replace the unordered_map with C int array, use bitmask to create  arrays of 64 elements, first use C++, and then use python, so the 100% code is made.

沒有留言:

Related Posts Plugin for WordPress, Blogger...

熱門文章