Databricks Lipotso tsa Puisano

Databricks Array Lipotso

Potso ea 1. 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

Potso ea 2. Bala liketsahalo tsohle tse nang le sehlahisoa se ka tlase ho K Bothata "Bala tsohle tse latelang tse nang le sehlahisoa se ka tlase ho K" e re o fuoe lethathamo la linomoro. Hona joale fumana palo ea liphetho tse nang le sehlahisoa se ka tlase ho kenyelletso e fanoeng K. Mohlala a [] = {1, 2, 3, 4, 5} k = 8 Palo ea tse latelang tlase ...

Bala haholoanyane

Potso ea 3. Kakaretso ea likarolo tsa bonyane le tse phahameng tsa litepana tsohle tsa boholo k Polelo ea Bothata Bothata "Kakaretso ea likarolo tse nyane le tse phahameng tsa lithupa tse nyane tsa boholo k" e re o fuoe lethathamo le nang le linomoro tse ntle le tse fosahetseng, fumana lintlha tsa bonyane le boholo ba likarolo tsohle tsa boholo ba k. Mehlala arr [] = {5, 9, 8, 3, ...

Bala haholoanyane

Potso ea 4. Bala litorotsoana tse nang le palo e lekanang ea 1 le 0 Polelo ea Bothata Bothata "Bala li-subarrara tse nang le palo e lekanang ea 1 le 0's" e re o filoe sehlopha se nang le li-0 le 1 feela. Polelo ea bothata e kopa ho fumana palo ea li-sub-arrays tse nang le ha ho lekane le lipapatso tsa 0. Mohlala arr [] = {1, 0, 0, ...

Bala haholoanyane

Potso ea 5. Bala likaroloana tse potolohileng tse nang le likarolo tse fapaneng ka ho lekana le tatellano ea mantlha Polelo ea Bothata "Bala likaroloana tse ka tlase tse nang le likarolo tse fapaneng hantle le tsa mantlha" e re o fuoe lenane le le leng. Polelo ea bothata e kopa ho fumana palo e felletseng ea li-sub-arrays tse nang le likarolo tsohle tse fapaneng joalo ka ha li le teng ka tatellano ea mantlha. Mohlala arr [] = {2, 1, 3, 2, ...

Bala haholoanyane

Potso ea 6. Fumana lenane le lenyane ka ho fetisisa le nepahetseng le ke keng la emeloa e le kakaretso ea seteishene sefe kapa sefe sa sehlopha se fanoeng Polelo ea Bothata O fuoa mefuta e mengata ea linomoro. Re hloka ho fumana palo e nyane ka ho fetisisa ea linomoro e ke keng ea emeloa e le kakaretso ea seteishene sefe kapa sefe sa sehlopha se fanoeng. Mohlala arr [] = {1,4,7,8,10} 2 Tlhaloso: Hobane ha ho na mofuta o fe kapa o fe o ka emelang 2 joalo ka ...

Bala haholoanyane

Potso ea 7. Mabokose a hatisang Bothateng ba ho Atisa Chain ea Matrix Polelo ea Bothata Re hloka ho fumana tatellano ea ho atisoa ha matriki hore palo ea ts'ebetso e amehang katisong ea matriki kaofela e fokotsehe. Ebe re hloka ho hatisa odara ena ke hore, ha re hatisa masakaneng bothateng ba katiso ea liketane tsa matrix. Nahana hore o na le litlelase tse 3 A, B, ...

Bala haholoanyane

Potso ea 8. Fumana likarolo tse tharo ho tsoa ho mefuta e meraro e fapaneng e fapaneng hoo e ka bang + b + c = kakaretso Sum tse tharo ke bothata bo ratoang ke batho ba botsang lipotso. Ke bothata boo ke ileng ka bo botsoa ka seqo nakong ea tlhahlobo ea Amazon. Kahoo, ntle le ho senya nako ho ea bothateng. Sehlopha se nang le linomoro tse nepahetseng le tse fosahetseng. Linomoro tse tharo tse ka fihlang ho zero / li ka fetoloa, ...

Bala haholoanyane

Potso ea 9. Tharollo ea LeetCode ea Metsi a ho Tlisa Pula Bothateng ba LeetCode ea Metsi a Trapping Rain Water, re fane ka linomoro tsa N non-negative tse emelang 'mapa oa bophahamo 'me bophara ba bar e' ngoe le e 'ngoe ke 1. Re tlameha ho fumana bongata ba metsi a ka qabelloang mohahong o ka holimo. Mohlala Ha re utloisise hore ka mohlala Bakeng sa ...

Bala haholoanyane

Potso ea 10. Nomoro e nyane ka ho fetisisa e sieo ka tatellano e sa hlophisoang Polelo ea Bothata Lethathamong le fanoeng le sa hlophisoang fumana palo e nyane ka ho fetisisa e nepahetseng e le sieo ka tatellano e sa hlophisoang. Nomoro e nepahetseng ha e kenyeletse 0. Re ka fetola mefuta ea mantlha ha ho hlokahala. Sehlopha se ka ba le linomoro tse ntle le tse fosahetseng. Mohlala a. Lenane la ho kenya: [3, 4, -1, 0, -2, 2, 1, ...

Bala haholoanyane

Databricks String Lipotso

Potso ea 11. Motsoako oa Litlhaku tsa Nomoro ea Mohala Ka litlhaku tse kopaneng tsa bothata ba nomoro ea mohala, re fane ka khoele e nang le linomoro ho tloha ho 2 ho isa ho 9. Nomoro ea palo ke ...

Bala haholoanyane

Potso ea 12. Hlahloba Litsela Mathateng a Decode Ways re fane ka khoele e se nang letho e nang le linomoro feela, fumana palo ea litsela tsa ho e khetholla u sebelisa 'mapa o latelang:' A '-> 1' B '-> 2 ...' Z '-> 26 Mohlala S = "123" Palo ea litsela tsa ho khetholla khoele ena ke 3 Haeba re ...

Bala haholoanyane

Potso ea 13. Fetolela khoele e pheta-phetang mohala o bolelele K Polelo ea Bothata Bothateng ba "Fetolela khoele e pheta-phetang karolo e telele ea bolelele K" re fane ka khoele "s" le "int" e kholo. Ngola lenaneo ho lekola hore na ho ka khonahala ho e fetolela khoeleng e pheta-phetoang ea mohala o nang le ...

Bala haholoanyane

Lipotso tsa Sefate sa Databricks

Potso ea 14. Lekola hore na Sefate sa Binary se felletsoeng kapa che Polelo ea Bothata Bothata "Hlahloba hore na Sefate sa Binary se felletse kapa che" se re o fuoe motso oa sefate sa binary, hlahloba hore na sefate se felletse kapa che. Sefate sa Binary se felletseng se tlatsitsoe maemong ohle ntle le boemo ba hoqetela le li-node ...

Bala haholoanyane

Lipotso tsa Stack tsa Databricks

Potso ea 15. 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

Potso ea 16. Tharollo ea LeetCode ea Metsi a ho Tlisa Pula Bothateng ba LeetCode ea Metsi a Trapping Rain Water, re fane ka linomoro tsa N non-negative tse emelang 'mapa oa bophahamo 'me bophara ba bar e' ngoe le e 'ngoe ke 1. Re tlameha ho fumana bongata ba metsi a ka qabelloang mohahong o ka holimo. Mohlala Ha re utloisise hore ka mohlala Bakeng sa ...

Bala haholoanyane

Lipotso tsa lethathamo la li-databricks

Potso ea 17. Kakaretso ea likarolo tsa bonyane le tse phahameng tsa litepana tsohle tsa boholo k Polelo ea Bothata Bothata "Kakaretso ea likarolo tse nyane le tse phahameng tsa lithupa tse nyane tsa boholo k" e re o fuoe lethathamo le nang le linomoro tse ntle le tse fosahetseng, fumana lintlha tsa bonyane le boholo ba likarolo tsohle tsa boholo ba k. Mehlala arr [] = {5, 9, 8, 3, ...

Bala haholoanyane

Potso ea 18. Lekola hore na Sefate sa Binary se felletsoeng kapa che Polelo ea Bothata Bothata "Hlahloba hore na Sefate sa Binary se felletse kapa che" se re o fuoe motso oa sefate sa binary, hlahloba hore na sefate se felletse kapa che. Sefate sa Binary se felletseng se tlatsitsoe maemong ohle ntle le boemo ba hoqetela le li-node ...

Bala haholoanyane

Databricks Matrix Lipotso

Potso ea 19. Mabokose a hatisang Bothateng ba ho Atisa Chain ea Matrix Polelo ea Bothata Re hloka ho fumana tatellano ea ho atisoa ha matriki hore palo ea ts'ebetso e amehang katisong ea matriki kaofela e fokotsehe. Ebe re hloka ho hatisa odara ena ke hore, ha re hatisa masakaneng bothateng ba katiso ea liketane tsa matrix. Nahana hore o na le litlelase tse 3 A, B, ...

Bala haholoanyane

Databricks Lipotso tse ling

Potso ea 20. 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 khoele, Khoele ...

Bala haholoanyane

Potso ea 21. Moralo Skiplist LeetCode Tharollo Tlhaloso ea Bothata Boqapi Skiplist LeetCode Tharollo - Rala Skiplist ntle le ho sebelisa lilaeborari tse hahiloeng. Skip list ke sebopeho sa data se nkang O(log(n)) nako ho kenya, ho hlakola le ho batla. Ha ho bapisoa le sefate le sefate se sefubelu-botšo se nang le ts'ebetso le ts'ebetso e ts'oanang, bolelele ba khoutu ea Skiplist bo ka bapisoa ...

Bala haholoanyane

Potso ea 22. Fetola Sets'oants'o sa LeetCode Tharollo Polelo ea Bothata Rotate Image LeetCode Solution - U fuoa nxn 2D matrix e emelang setšoantšo, potoloha setšoantšo ka likhato tse 90 (ho ea ka nako). U tlameha ho potoloha setšoantšo sebakeng, ho bolelang hore u tlameha ho fetola matrix a 2D ka kotloloho. U SE KE UA fana ka matrix e 'ngoe ea 2D ebe u potoloha. Mohlala oa 1 oa Teko: Kenyeletso: ...

Bala haholoanyane

Potso ea 23. Lekhasi le Haufi ka ho Fetisisa ho Binary Tree LeetCode Tharollo Polelo ea Bothata Lekhasi le Haufi ka ho Fetisisa Tharollo ea LeetCode ea Sefate sa Binary - Ho fanoe ka motso oa sefate sa binary moo node e 'ngoe le e 'ngoe e nang le boleng bo ikhethang le palo e feletseng ea k, khutlisetsa boleng ba lekhasi le haufi le lekhasi ho sepheo sa k sefateng. Haufi le lekhasi ho bolela palo e fokolang ea mathōko a tsamauoang holim'a sefate sa binary ho ea ...

Bala haholoanyane

Potso ea 24. Merge K Mananeo a Kopaneng a Kopaneng Kopanya K e hlophisitsoeng lethathamong le thathamisitsoeng bothata e tsebahala haholo ho latela pono ea lipotso. Potso ena e botsa makhetlo a mangata likhamphaning tse kholo joalo ka Google, Microsoft, Amazon, jj. Re tlameha ho li kopanya hore e be ...

Bala haholoanyane

Potso ea 25. Sliding Window Boholo Bothateng ba Sliding Window Maximum re fane ka li-nums, bakeng sa fensetere e 'ngoe le e' ngoe ea boholo ba k, fumana palo e phahameng ea fensetere. Mehlala ea ho kenya linomoro [] = {1,3, -1, -3,5,3,6,7} k = 3 Sephetho {3,3,5,5,6,7} Tlhaloso Mokhoa o sa Tsebeng oa ho Sliding Window Boholo Bakeng sa fensetere e 'ngoe le e' ngoe ea boholo ba k, e tšela ...

Bala haholoanyane

Translate »