American Express Lipotso tsa Puisano

Lipotso tsa American Express Array

Potso ea 1. Bolelele bo Holimo ba Khoele e Kopanetsoeng e nang le Tharollo ea Leetcode ea Litlhaku tse Ikhethang Polelo ea Bothata Bolelele bo Holimo ba Khoele e Kopanetsoeng e nang le Litlhaku tse Ikhethileng Tharollo ea LeetCode - "Bolelele bo Felletseng ba Khoele e Kopanetsoeng e nang le Litlhaku tse Ikhethileng" e re o filoe likhoele tse ngata mme o hloka ho khetha tatellano efe kapa efe ea lethathamo le fanoeng ebe o li kopanya. likhoele ho theha ...

Bala haholoanyane

Potso ea 2. Kakaretso ea Likarolo tse lekana le k Ho fanoe ka palo e felletseng le kakaretso k. Fumana palo e felletseng ea litapole tse tsamaellanang tsa sehlopha se fanoeng seo likarolo tsa sona li lekanang le k. Mohlala Keletso 1: arr [] = {5,0,5,10,3,2, -15,4} k = 5 Output: 7 Input 2: arr [] = {1,1,1,2,4, -2} k = 2 Sephetho: Tlhaloso e 4: nahana ka mohlala-1 ...

Bala haholoanyane

Potso ea 3. Subarray ka Kakaretso e fanoeng Polelo ea Bothata Karolong e ka tlase ea bothata bo fanoeng, re fane ka sehlopha se nang le likarolo tse ntle. Re tlameha ho fumana karoloana eo ho eona kakaretso ea likarolo tsohle tsa karoloana e lekanang le given_sum. Subarray e fumaneha ho tsoa ho sehlopha sa mantlha ka ho hlakola tse ling ...

Bala haholoanyane

Potso ea 4. Palo e kahodimodimo ea Kakaretso ea Likarolo tse sa Tšoaneng Polelo ea Bothata Ho lenane la "Maximum Sum of Non Consecutive Elements", o hloka ho fumana lintlha tse sa latellanang. U ke ke ua eketsa linomoro tsa moahelani haufinyane. Mohlala [1,3,5,6,7,8,] mona 1, 3 li haufi kahoo re ke ke ra li eketsa, 'me tse 6, 8 ha li haufi kahoo re ...

Bala haholoanyane

Lipotso tsa likhoele tsa American Express

Potso ea 5. Bolelele bo Holimo ba Khoele e Kopanetsoeng e nang le Tharollo ea Leetcode ea Litlhaku tse Ikhethang Polelo ea Bothata Bolelele bo Holimo ba Khoele e Kopanetsoeng e nang le Litlhaku tse Ikhethileng Tharollo ea LeetCode - "Bolelele bo Felletseng ba Khoele e Kopanetsoeng e nang le Litlhaku tse Ikhethileng" e re o filoe likhoele tse ngata mme o hloka ho khetha tatellano efe kapa efe ea lethathamo le fanoeng ebe o li kopanya. likhoele ho theha ...

Bala haholoanyane

Potso ea 6. 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 American Express

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

Potso ea 8. Fetolela BST e tloaelehileng ho BST e leka-lekaneng Polelo ea Bothata e Fuoe Sefate sa Patlo ea Binary (BST), ngola algorithm ho fetolela BST ho Sefate se Ts'oanang sa Binary Search. Sefate sa Binary Search se leka-lekaneng ha se letho haese sefate sa patlo ea binary seo phapang ea sona lipakeng tsa bophahamo ba subtree ea leqele le letsohong le letona e ka tlase ho kapa e lekanang le 1. ...

Bala haholoanyane

Lipotso tsa American Express Stack

Potso ea 9. Hlahloba hore na lethathamo le ka hlophisoa moleng o mong ho sebelisoa stack Polelo ea Bothata Bothata "Hlahloba hore na mola o ka hlophisoa moleng o mong o sebelisa pokello" o re o fuoe lethathamo le nang le li-elemente, likarolo tse molaong ke tumello ea linomoro 1 ho isa ho n. Lekola hore na lethathamo lena le ka hlophisoa ka tatellano e ntseng e eketseha ...

Bala haholoanyane

American Express Queue Lipotso

Potso ea 10. 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 11. 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

Potso ea 12. Hlahloba hore na lethathamo le ka hlophisoa moleng o mong ho sebelisoa stack Polelo ea Bothata Bothata "Hlahloba hore na mola o ka hlophisoa moleng o mong o sebelisa pokello" o re o fuoe lethathamo le nang le li-elemente, likarolo tse molaong ke tumello ea linomoro 1 ho isa ho n. Lekola hore na lethathamo lena le ka hlophisoa ka tatellano e ntseng e eketseha ...

Bala haholoanyane

Potso ea 13. Palo e nyane ka ho fetisisa ea palo e fanoeng Palo e nyane ka ho fetisisa ea palo e fanoeng e entsoeng ka linomoro 0 le 9 bothata feela boo re bo fileng nomoro n, fumana nomoro e nyane haholo e entsoeng ho tsoa ho ea 0 le 9 e arohanngoang ke n. Nka hore karabo e ke ke ea feta 106. Mehlala Keketso ea 3 Sephetho sa 9 ...

Bala haholoanyane

American Express Lipotso tse ling

Potso ea 14. Sehlahisoa sa Array Ntle le Tharollo ea Self LeetCode Sehlahisoa sa Bothata Sehlahisoa sa Array Ntle le Tharollo ea Self LeetCode - Ho fanoe ka palo e feletseng ea palo, khutlisetsa karabo e fapaneng hoo karabo[i] e lekanang le sehlahisoa sa likarolo tsohle tsa lipalo ntle le linomoro[i]. Sehlahisoa sa sehlongoapele leha e le sefe kapa sehlongoana sa linomoro se tiisitsoe hore se tla lekana palo e feletseng ea 32-bit. U tlameha ho ngola algorithm e tsamaeang ka nako ea O(n) ntle le ho sebelisa karohano ...

Bala haholoanyane

Potso ea 15. Ho fokotsa Lijana Tharollo ea LeetCode Phatlalatso ea Bothata Ho Fokotsa Lijana Tharollo ea LeetCode - Chef e bokelletse lintlha tse mabapi le boemo ba khotsofalo ea n lijana tsa hae. Sephehi se ka pheha sejana leha e le sefe ka nako e le 'ngoe. Coefficient ea nako e ts'oanang ea sejana e hlalosoa e le nako e nkuoang ho pheha sejana seo ho kenyelletsa le lijana tse fetileng tse atisitsoeng ke khotsofalo ea eona ...

Bala haholoanyane

Potso ea 16. Sefate se le seng sa LeetCode Tharollo Polelo ea Bothata Bothata Same Tree e re Ho fanoe ka metso ea lifate tse peli tsa binary p le q, ngola mosebetsi ho hlahloba hore na lia tšoana kapa che. Lifate tse peli tsa binary li nkoa li tšoana haeba li tšoana ka sebopeho, 'me li-node li na le boleng bo tšoanang. Mohlala: Nyeoe ea Teko ...

Bala haholoanyane

Potso ea 17. Tlosa Node ea Nth Ho tloha Qetellong ea Tharollo ea Leetcode Phatlalatso ea Bothata Tlosa Node ea Nth Ho tloha Qetellong ea Lethathamo la Leetcode Tharollo - e bolela hore u fuoa hlooho ea lenane le amanang le eona 'me u hloka ho tlosa node ea nth ho tloha qetellong ea lenane lena. Kamora ho hlakola node ena, khutlisetsa hlooho ea lenane le fetotsoeng. Mohlala: Kenyelletso:...

Bala haholoanyane

Potso ea 18. Fumana ntlha moo ts'ebetso e eketsehang ka monotonically e bang ntle ka lekhetlo la pele Polelo ea Bothata Ho "Fumana ntlha moo ts'ebetso e eketsehang ka monotonically e bang ntle lekhetlo la pele" re fane ka ts'ebetso "int f (unsigned int x)" e nkang palo e se nang bobe 'x' e le tlatsetso ebe e khutlisa palo e le sehlahisoa . Mosebetsi o ntse o eketseha ka mokhoa o ikhethileng mabapi le boleng ba x, ke hore, ...

Bala haholoanyane

Translate »