Tlosa Bonyane ho Etsa Tharollo ea LeetCode e Nepahetseng

Polelo ea Bothata Nako e Nyenyane ea Tlosa ho Etsa Masakaneng a Nepahetseng Tharollo ea LeetCode - U fuoa likhoele tsa '(', ')' le litlhaku tse nyane tsa Senyesemane. Mosebetsi oa hau ke ho tlosa bonyane palo ea masaka ('(' kapa ')', maemong afe kapa afe ) e le hore khoele ea mashaka e be ...

Bala haholoanyane

Tharollo ea Leetcode e Tloaelehileng e telele ka ho fetisisa

Polelo ea Bothata The Longest Common Prefix LeetCode Solution - "Longest Common Prefix" e bolela hore ho fanoe ka mefuta e mengata ea likhoele. Re hloka ho fumana sehlongwapele se selelele ka ho fetisisa hara dikgwele tsena. Haeba ho se na sehlongoapele, khutlisetsa khoele e se nang letho. Mohlala: Kenyeletso: strs = [“palesa”,”flow”,”flight”] Sephetho: “fl” Tlhaloso: “fl” ke e telele ka ho fetesisa…

Bala haholoanyane

Tharollo ea Leetcode ea Metsi a ho Tlisa Pula

Polelo ea Bothata The Trapping Rain Water LeetCode Solution - "Trapping Rain Water" e bolela hore ho fanoe ka lethathamo la libaka tse phahameng tse emelang 'mapa oa bophahamo moo bophara ba bar e' ngoe le e 'ngoe e leng 1. Re hloka ho fumana palo ea metsi a qabeletsoeng ka mor'a pula. Mohlala: Kenyo: bophahamo = [0,1,0,2,1,0,1,3,2,1,2,1] Sephetho: 6 Tlhaloso: Sheba ...

Bala haholoanyane

Fetola Mantsoe ka Tharollo ea LeetCode ea Mohala oa III

Phatlalatso ea Bothata e Fetola Mantsoe ka Tharollo ea LeetCode ea String III - Re fuoa khoele 'me re kōptjoa ho fetola tatellano ea litlhaku lentsoeng le leng le le leng ka har'a polelo ha re ntse re boloka sebaka se tšoeu le tatellano ea mantsoe a pele. Mehlala & Litlhaloso Mohlala 1: Kenyeletso: s = "Ha re nke LeetCode ...

Bala haholoanyane

Tsela e Khutšoane ka ho Fetisisa Grid e nang le Litšitiso Pheliso ea LeetCode Tharollo

Polelo ea Bothata Tsela e Khutšoane ka ho Fetisisa Grid e nang le Litšitiso Pheliso ea LeetCode Tharollo - U fuoa grid ea matrix ea mxn moo sele ka 'ngoe e leng 0 (letho) kapa 1 (tšitiso). O ka ea holimo, tlase, ho le letšehali, kapa ho le letona ho tloha le ho ea seleng e se nang letho ka mohato o le mong. Khutlisetsa palo e fokolang ea mehato eo u lokelang ho e tsamaea ho tloha ka holimo le letšehali ...

Bala haholoanyane

Haufi le Binary Search Tree Boleng Leetcode Tharollo

Polelo ea Bothata : Haufinyane Binary Search Tree Value Leetcode Tharollo - Ho fanoe ka motso oa sefate sa lipatlisiso sa binary le boleng ba sepheo, khutlisetsa boleng ho BST e haufi le sepheo. Mohlala : Mohlala 1 Kenyeletso: motso = [4,2,5,1,3], target = 3.714286 Output: 4 Mohlala 2 Kenyo: motso = [1], target ...

Bala haholoanyane

Rectangle e Khōlō ka ho Fetisisa ho Histogram LeetCode Tharollo

Polelo ea Bothata Rectangle e Khōlō ka ho Fetisisa ho Histogram LeetCode Tharollo – Ha ho fanoe ka palo e fapaneng ea bophahamo ba litopo tse emelang bophahamo ba bar ea histogram moo bophara ba bar e 'ngoe le e 'ngoe e leng 1, khutlisetsa sebaka sa khutlonnetsepa e kholo ka ho fetisisa ho histogram. Mohlala oa Tlhahlobo ea 1: Kenyelletso: bophahamo = [2, 1, 5, 6, 2, 3] Sephetho: 10 Tlhaloso: ...

Bala haholoanyane

Mantsoe a Tloaelehileng a Matching Kamehla Matching Matching LeetCode Tharollo

Polelo ea Mathata Matching a Tloaelehileng a Matching Regular Expression Matching LeetCode Tharollo - Ho fanoe ka khoele ea ho kenya s le mohlala p, kenya ts'ebetsong mokhoa o tloaelehileng oa ho bapisa le tšehetso bakeng sa '.' le '*' moo: '.' E tsamaellana le tlhaku e le 'ngoe.​​'*' E tsamaellana le zero kapa ho feta tsa elemente e tlang pele. Ho bapisa ho lokela ho koahela khoele eohle ea ho kenya (eseng leeme). Mohlala oa 1 oa Teko: Kenyeletso: ...

Bala haholoanyane

Nako e Thehiloeng ke Key-Boleng Store LeetCode Tharollo

Polelo ea Bothata Nako e Thehiloeng Lebenkeleng la Bohlokoa LeetCode Tharollo - Etsa moralo oa data oa bohlokoa oa nako o ka bolokang litekanyetso tse ngata bakeng sa senotlolo se le seng ka litempe tsa nako tse fapaneng le ho fumana boleng ba senotlolo ka setempe se itseng sa nako. Kenya ts'ebetsong sehlopha sa TimeMap: TimeMap() E qala morero oa sebopeho sa data. void set (senotlolo sa likhoele, Khoele ...

Bala haholoanyane

Translate »