DE Shaw Lipotso tsa Puisano

Lipotso tsa DE Shaw Array

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. Tharollo e Amanang ea Mofuta oa Leetcode Bothateng bona, re fuoa mefuta e 'meli ea linomoro tse nepahetseng. Lintho tsohle tsa sehlopha sa bobeli li ikhethile 'me li teng ka har'a sehlopha sa pele. Leha ho le joalo, sehlopha sa pele se ka ba le likarolo tse kopilitsoeng kapa likarolo tse seng sehlopheng sa bobeli. Re hloka ho hlophisa sehlopha sa pele ...

Bala haholoanyane

Potso ea 3. Subarray e telele ka ho fetesisa e nang le palo ea 1 e le ngoe ho feta palo ea 0s Re fane ka mefuta e mengata ea linomoro. Lenane le na le 1 le 0 feela. Polelo ea bothata e kopa ho fumana bolelele ba Sub-Array e telele ka ho fetesisa e nang le palo ea nomoro ea 1 e le 'ngoe ho feta palo ea 0 ka tatellano. Keletso ea Mohlala: arr [] = ...

Bala haholoanyane

Potso ea 4. Nako e Ntle ea ho Reka le ho Rarolla Tharollo ea Leetcode ea Stock II Polelo ea bothata Bothateng ba "Nako e Ntle ea ho Reka le ho Rekisa Stock II," re fuoa lethathamo moo karolo ka 'ngoe sehlopheng sena e nang le theko ea setoko se fanoeng ka letsatsi leo. Tlhaloso ea thekiso ke ho reka karolo e le 'ngoe ea setoko le ho e rekisa ...

Bala haholoanyane

Potso ea 5. Subarray e nang le kakaretso ea 0 Bothata "Fumana hore na ho na le subarray e nang le kakaretso ea 0" e re o fuoe lenane le felletseng le nang le linomoro tse fosahetseng hape. Polelo ea bothata e botsa ho fumana hore na ho na le mofuta ofe kapa ofe oa boholo bo bonyane 1. Karolo ena e lokela ho ba le kakaretso e lekanang le 1. Mohlala arr [] = {2,1, -3,4,5} ...

Bala haholoanyane

Potso ea 6. Nako e telele ka ho Fetisisa ea Bitonic Ha re re u na le li-integer tse ngata, polelo ea bothata e botsa ho fumana tatellano e telele ka ho fetesisa ea li-bitonic. Letoto la tatellano ea li-bitonic le nkuoa e le tatellano e eketsang pele ebe ea fokotseha. Mohlala arr [] = {1,4,2,76,43,78,54,32,1,56,23} 7 Tlhaloso 1 ⇒ 4 ⇒ 76 ⇒ 78 ⇒ 54 ...

Bala haholoanyane

Potso ea 7. Lethathamo la Lipotso tsa lipapatso tse ngata le sehlahisoa Bothata "Lipotso tsa Array bakeng sa ho atisa, tse nkeloang sebaka le sehlahisoa" li re o fuoe lethathamo la linomoro mme ho tla ba le mefuta e meraro ea lipotso, moo o tlamehang ho rarolla mofuta o latelang oa lipotso: Mofuta oa 1: Ho tla ba le litekanyetso tse tharo tse setseng , ho le letona le nomoro X. Ho sena ...

Bala haholoanyane

Potso ea 8. Nako ea linako tse ling e eketsa ts'ebetso ka bongata O fane ka palo e felletseng mme qalong, e ile ea qalisoa e le 0 hape ea fuoa mefuta. Mosebetsi ke ho kenyelletsa nomoro e fanoeng ka bongata le ho printa sephetho se hlahisoang. Mohlala arr [] = {0, 0, 0, 0, 0} Potso: {(0, 2, 50), (3, ...

Bala haholoanyane

Potso ea 9. Lipotso tsa lipalo tsa likarolo tse arohaneng tse nang le boleng ba mofuta o fanoeng Polelo ea Bothata Bothata "Lipotso bakeng sa lipalo tsa likarolo tsa likarolo tse nang le boleng bo fanoeng" li bolela hore u na le palo e kholo le palo tse peli x le y. Polelo ea bothata e kopa ho fumana palo ea linomoro tse teng ka bongata tse pakeng tsa x le y. ...

Bala haholoanyane

Potso ea 10. Palo ea likarolo tse tlase kapa tse lekanang le palo e fanoeng ho karoloana e fanoeng Polelo ea Bothata Bothata "Palo ea likarolo tse ka tlase ho kapa tse lekanang le palo e fanoeng ho karoloana e fanoeng" e re o fuoe lenane le le leng la lipotso. Ho tla ba le mefuta e 'meli ea lipotso ho potsoPheta (i, v): Ho tla ba le linomoro tse peli tseo ke li balang, ...

Bala haholoanyane

Potso ea 11. Li-GCD tsa li-index li fanoe ka bongata Polelo ea Bothata Bothata ba 'li-GCD tsa li-index tse fuoeng ka bongata "bo re o fuoa lenane le kopaneng le lipotso tse fapaneng. Polelo ea bothata e kopa ho fumana Greatest Common Divisor ea li-sub-array tse thehiloeng kahara. Mohlala arr [] = {10, 5, 18, 9, ...

Bala haholoanyane

Potso ea 12. Lipotso tsa GCD ea linomoro tsohle tsa sehlopha ntle le likarolo tsa mofuta o fanoeng Polelo ea Bothata Bothata ba "Lipotso bakeng sa GCD ea linomoro tsohle tsa sehlopha ntle le likarolo tsa mofuta o fanoeng" bothata bo re o tla fuoa lenane le felletseng la lipotso. Potso ka 'ngoe e na le nomoro e setseng le ho le letona. Polelo ea bothata e kopa ho fumana ...

Bala haholoanyane

Potso ea 13. Subset ka kakaretso e ka arohanngoang ke m Polelo ea Bothata Bothata "Subset with sum divisible by m" e re o filoe lethathamo la linomoro tse seng mpe le palo e felletseng ea m. Hona joale o hloka ho fumana hore na ho na le sethala se nang le kakaretso e arohanngoang ke m. Ke kakaretso ea subset eo e lokelang ho fana ka eona e le ...

Bala haholoanyane

Potso ea 14. Lihlahisoa tsa mekoloko ka tatellano Polelo ea Bothata Bothata "Lihlahisoa tsa mekhahlelo ka bongata" e re o fuoa lenane le felletseng le nang le linomoro ho tloha ho 1 ho ea ho n le q palo ea lipotso. Potso ka 'ngoe e na le moeli. Polelo ea bothata e kopa ho fumana sehlahisoa kahara sebaka se fanoeng tlasa ...

Bala haholoanyane

Potso ea 15. Nako e molemohali ea ho reka le ho rekisa setoko Polelo ea Bothata Bothata "Nako e Ntle ea ho Reka le ho Rekisa Li-stock" e re o fuoe lethathamo la litheko tsa bolelele n, moo karolo eo e bolokang theko ea setoko ka letsatsi leo. Haeba re ka etsa khoebo e le 'ngoe feela, ke hore, ho reka ka letsatsi le le leng ...

Bala haholoanyane

Potso ea 16. Phunya linomoro tse peli tsa bobeli e le a2-b1-a1-b2-a2-b3 - .. bn ntle le ho sebelisa sebaka se eketsehileng Polelo ea Bothata O fuoa linomoro tse ngata. Bothata "Sutle 2n integer as a1-b1-a2-b2-a3-b3 - .. bn without using space extra" e kopa ho hlakola linomoro tsohle tse lenaneng hore linomoro tse (x0, x1, x2, x3, y0, y1, y2, y3) e tla hlakoloa joalo ka x0, y0, ...

Bala haholoanyane

Potso ea 17. Lintho tse fapaneng tse haufi ka tatellano Tlhaloso ea Bothata Ha re re re na le lenane le le leng. Bothata "Lintho tse ikhethileng tse haufi" li botsa hore na ho a khonahala ho fumana lethathamo leo linomoro tsohle tse haufi li khethollang kapa che ka ho sesa likarolo tse peli tse haufi kapa tsa baahisani ka bongata haeba e ...

Bala haholoanyane

Potso ea 18. Sehlahisoa sa mefuta e mengata ntle le ea hau Polelo ea Bothata "Sehlahisoa sa mefuta e mengata ntle le boithati", e re o filoe lethathamo le []. Hatisa mofuta o mong oa p [] oa boholo bo lekanang hoo boleng ba i'th index of array p bo lekanang le sehlahisoa sa likarolo tsohle tsa sehlopha sa mantlha ...

Bala haholoanyane

Potso ea 19. Fumana lipara ka kakaretso e fuoeng hoo likarolo tsa lipara li leng mela e fapaneng Polelo ea Bothata "Fumana lipara tse nang le chelete e fuoeng hoo likarolo tsa lipara li leng mela e fapaneng" bothata bo re o filoe palo ea linomoro le boleng bo bitsoang "kakaretso". Polelo ea mathata e kopa ho fumana lipara tsohle ka har'a matrix tse akaretsang ho tse fuoeng ...

Bala haholoanyane

Potso ea 20. Lintho tse tloaelehileng meleng eohle ea matrix e fanoeng Polelo ea Bothata "Mathata a tloaelehileng melaong eohle ea matrix e fanoeng" bothata bo bolela hore, o fuoa matrix ea M * N. Polelo ea bothata e kopa ho fumana lintlha tsohle tse tloaelehileng ka har'a matrix moleng ka mong oa matrix ka nako ea O (M * N). Mohlala arr [] = {{12, 1, 4, 5, ...

Bala haholoanyane

Potso ea 21. Boholo ba likarolo tse nyane tsa bitonic Polelo ea Bothata Re fuoa lenane le nang le linomoro tse ngata. Re hloka ho fumana palo e phahameng ea palo ea bonyane. Subonic ea bitonic ha se letho empa ke karoloana feela moo likarolo li hlophisitsoeng ka tatellano e itseng. E leng hore likarolo tsa pele li ntse li eketseha ka tatellano ebe ho latela ...

Bala haholoanyane

Potso ea 22. Subarray e kholo ka ho fetesisa ea Sum Polelo ea Bothata O fuoa linomoro tse ngata. Polelo ea bothata e kopa ho fumana karolelano e kholo ka ho fetisisa ea chelete. Sena ha se bolele letho haese ho fumana karoloana e nyane (e tsoelang pele) e nang le kakaretso e kholo ka ho fetisisa har'a lithaelese tse ling tsohle tse lenaneng le fanoeng. Mohlala arr [] = {1, -3, 4, ...

Bala haholoanyane

Potso ea 23. Katiso ya Chain ya Matrix Mathateng a mathathamo a II a katiso ea matrix, re fane ka litekanyo tsa matriki, fumana tatellano ea katiso ea bona joalo ka hore palo ea ts'ebetso e amehang katekisong ea matriki kaofela e fokotsehe. Nahana hore o na le litriki tsa 3 A, B, C tsa boholo ba axb, bx ...

Bala haholoanyane

Potso ea 24. Fumana Peak Element ho tsoa Lenaneng Polelo ea Bothata Bothateng ba "Fumana Peak Element ho tsoa ho Lenane" re fane ka palo ea linomoro. Fumana ntlha e phahameng. Ka bongata, elemente ke ntlha ea tlhoro, haeba elemente e le kholo ho feta baahelani ka bobeli. Bakeng sa likarolo tsa sekhutlo, re ka nahana ka eona feela ...

Bala haholoanyane

Potso ea 25. Sehlahisoa sa Array Puzzle Polelo ea Bothata Bothateng ba selotho se nang le lihlahisoa re hloka ho theha sehlopha moo karolo ea eona e tla ba sehlahisoa sa likarolo tsohle tse lenaneng le fanoeng ntle le karolo ea boemo ba eona. Keletso ea mohlala 5 10 3 5 6 2 Khumo 180 600 360 300 900 ...

Bala haholoanyane

DE Shaw Lipotso tsa Khoele

Potso ea 26. Boholo ba phetoho ea boima ba khoele e fanoeng Polelo ea Bothata Phetoho e phahameng ea boima ba bothata ba khoele e fanoeng e re e fuoe khoele e nang le litlhaku tse peli feela 'A' le 'B'. Re na le ts'ebetso moo re ka fetolang khoele hore e be khoele e ngoe ka ho fetola mofuta o fe kapa o fe. Kahoo liphetoho tse ngata lia khoneha. Ho tsoa hohle kamoo ho ka khonehang ...

Bala haholoanyane

Potso ea 27. Substring Ka Concatenation Ea Mantsoe Ohle Ha re tsamaisa moelelo oa bothata ba mantsoe ohle, re fane ka khoele s mme lenane le na le mantsoe a mangata bolelele bo lekanang. Hatisa index ea ho qala ea substring e ka bang litholoana tsa ho kopanya mantsoe ohle a lenaneng ho ...

Bala haholoanyane

DE Shaw Tree Lipotso

Potso ea 28. Palo ea likarolo tse tlase kapa tse lekanang le palo e fanoeng ho karoloana e fanoeng Polelo ea Bothata Bothata "Palo ea likarolo tse ka tlase ho kapa tse lekanang le palo e fanoeng ho karoloana e fanoeng" e re o fuoe lenane le le leng la lipotso. Ho tla ba le mefuta e 'meli ea lipotso ho potsoPheta (i, v): Ho tla ba le linomoro tse peli tseo ke li balang, ...

Bala haholoanyane

Potso ea 29. Li-GCD tsa li-index li fanoe ka bongata Polelo ea Bothata Bothata ba 'li-GCD tsa li-index tse fuoeng ka bongata "bo re o fuoa lenane le kopaneng le lipotso tse fapaneng. Polelo ea bothata e kopa ho fumana Greatest Common Divisor ea li-sub-array tse thehiloeng kahara. Mohlala arr [] = {10, 5, 18, 9, ...

Bala haholoanyane

Lipotso tsa DE Shaw Stack

Potso ea 30. 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 31. Mola o sebelisa Stacks Ha re le lethathamong re sebelisa bothata ba mokoallo, re tlameha ho kenya tšebetsong mesebetsi e latelang ea lethathamo re sebelisa lits'ebetso tse tloaelehileng tsa sethala sa data, Enqueue: Eketsa ntlha ho fihlela qetellong ea lethathamo la lethathamo: Tlosa ntho ho tloha qalong ea lethathamo mohlala Input : Enqueue (5) Enqueue (11) Enqueue (39) Dequeue () ...

Bala haholoanyane

DE Shaw Queue Lipotso

Potso ea 32. Ts'ebetsong ea Deque o sebelisa Lenane la Doubly Linked Polelo ea Bothata Bothata "Ts'ebetsong ea Deque o sebelisa Lethathamo la Doubly Linked" e re o hloka ho kenya tšebetsong mesebetsi e latelang ea Deque kapa Doubly Ended Queue o sebelisa lethathamo le kopantsoeng habeli, insertFront (x): Kenya element x qalong ea Deque insertEnd (x Eketsa element x qetellong ea ...

Bala haholoanyane

Potso ea 33. Mola o sebelisa Stacks Ha re le lethathamong re sebelisa bothata ba mokoallo, re tlameha ho kenya tšebetsong mesebetsi e latelang ea lethathamo re sebelisa lits'ebetso tse tloaelehileng tsa sethala sa data, Enqueue: Eketsa ntlha ho fihlela qetellong ea lethathamo la lethathamo: Tlosa ntho ho tloha qalong ea lethathamo mohlala Input : Enqueue (5) Enqueue (11) Enqueue (39) Dequeue () ...

Bala haholoanyane

Lipotso tsa DE Shaw Matrix

Potso ea 34. Fumana lipara ka kakaretso e fuoeng hoo likarolo tsa lipara li leng mela e fapaneng Polelo ea Bothata "Fumana lipara tse nang le chelete e fuoeng hoo likarolo tsa lipara li leng mela e fapaneng" bothata bo re o filoe palo ea linomoro le boleng bo bitsoang "kakaretso". Polelo ea mathata e kopa ho fumana lipara tsohle ka har'a matrix tse akaretsang ho tse fuoeng ...

Bala haholoanyane

Potso ea 35. Lintho tse tloaelehileng meleng eohle ea matrix e fanoeng Polelo ea Bothata "Mathata a tloaelehileng melaong eohle ea matrix e fanoeng" bothata bo bolela hore, o fuoa matrix ea M * N. Polelo ea bothata e kopa ho fumana lintlha tsohle tse tloaelehileng ka har'a matrix moleng ka mong oa matrix ka nako ea O (M * N). Mohlala arr [] = {{12, 1, 4, 5, ...

Bala haholoanyane

Potso ea 36. Katiso ya Chain ya Matrix Mathateng a mathathamo a II a katiso ea matrix, re fane ka litekanyo tsa matriki, fumana tatellano ea katiso ea bona joalo ka hore palo ea ts'ebetso e amehang katekisong ea matriki kaofela e fokotsehe. Nahana hore o na le litriki tsa 3 A, B, C tsa boholo ba axb, bx ...

Bala haholoanyane

DE Shaw Lipotso tse ling

Potso ea 37. Asteroid Collision LeetCode Tharollo Problem Statement Asteroid Collision LeetCode Solution - Re fuoa sehlopha sa linaleli sa linaleli tse emelang li-asteroid ka tatellano. Bakeng sa asteroid ka 'ngoe, boleng bo feletseng bo emela boholo ba eona, 'me letšoao le emela tataiso ea eona (moelelo o nepahetseng o nepahetseng, moelelo o fosahetseng o setseng). Asteroid ka 'ngoe e tsamaea ka lebelo le tšoanang. Fumana naha...

Bala haholoanyane

Potso ea 38. Tsela e telele ka ho Fetisisa ea Keketseho ka Tharollo ea LeetCode ea Matrix Polelo ea Bothata Tsela e Eketsehileng ka ho Fetisisa ka Tharollo ea LeetCode ea Matrix - Ho fanoe ka mxn integers matrix, khutlisetsa bolelele ba tsela e telele ka ho fetisisa e ntseng e eketseha ka matrix. Ho tloha seleng e 'ngoe le e' ngoe, u ka tsamaea ka litsela tse 'nè: ho le letšehali, ho le letona, holimo, kapa tlase. O kanna oa se ke oa tsamaea ka nqa e le 'ngoe kapa oa tsamaea ka ntle ho moeli (ke hore, ho pota-pota ha ho lumelloe). Kenyelletso:...

Bala haholoanyane

Potso ea 39. Bonyane Palo ea Lipompo ho Buloa ho Nosetsa Tharollo ea LeetCode ea Serapa Polelo ea Bothata Bonyane Palo ea Lipompo tse ka Buloang ho Nosetsa Serapeng LeetCode Tharollo - Ho na le serapa se nang le lehlakore le le leng holim'a x-axis. Serapa se qala ntlheng ea 0 ebe se fella ntlheng ea n. (ke hore bolelele ba serapa ke n). Ho na le lipompo tsa n + 1 tse fumanehang libakeng tsa [0, 1, ..., n] ho ...

Bala haholoanyane

Potso ea 40. Boholo ba tsela ho Triangle ea Nomoro e Nepahetseng Bothata "Boholo ba tsela ho Triangle ea Linomoro tse Nepahetseng" bo bolela hore o fuoe linomoro tse ling ka sebopeho sa triangolo ea linomoro tse nepahetseng. Fumana chelete e holimo eo u ka e fihlellang haeba u qala holimo 'me u leba motheong hore u tsebe ho tsamaea ...

Bala haholoanyane

Potso ea 41. Ngola mosebetsi ho fumana sebaka sa mateano a litsela tse peli tse hokahaneng Polelo ea Bothata Bothata "Ngola mosebetsi ho fumana sebaka sa mateano a litsela tse peli tse hokahantsoeng" e re o fuoe manane a mabeli a hokahaneng. Empa ha se manane a ikemetseng a hokahaneng. Li hokahane ka nako e ngoe. Joale o hloka ho fumana ntlha ena ea liphapano tsa manane ana a mabeli. ...

Bala haholoanyane

Potso ea 42. Bothata ba ho taka Polelo ea Bothata "Bothata ba ho Tiling" e re o na le gridi ea boholo ba 2 x N le thaele ea boholo 2 x 1. Kahoo, fumana palo ea litsela tsa ho tlama gridi e fanoeng. Mohlala 3 2 Tlhaloso: Mokhoa oa ho rarolla bothata Re ka rarolla bothata bona ka ho sebelisa boits'oaro. ...

Bala haholoanyane

Translate »