Leetcode 159 Longest Substring with At Most Two Distinct Characters

This question is quite simple. we do not even use the hash table, cause there just would be two distinct characters in the result string.

So we just need to use two integer to record the number for each character appears, and to record the characters

發佈了123 篇原創文章 · 獲贊 0 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章