- Видео 6
- Просмотров 129
Berke Dilekoğlu
Добавлен 31 июл 2012
LeetCode 1792. Maximum Average Pass Ratio Python İle Çözüm
Leet Code'da bulunan 1792 numaralı Maximum Average Pass Ratio sorusunu Python ile çözdük.
00:00 Soruya İlk Bakış
00:50 1. Çözüm Yöntemi O((N+K)LOGN)
--------------------------------------------
Time Complexity
1. Initial Heap Construction:
* The loop iterates over the classes array, which contains n elements (where n is the number of classes).
* For each class:
* The initial possible_inc is calculated in O(1)
* heapq.heappush() is called, which takes O(logn)
* Total time complexity for this phase: O(nlogn)
2. Extra Students Distribution:
* The loop runs k times (where k is the number of extraStudents).
* For each iteration:
* heapq.heappop() takes O(logn)
* Updating the class and calculating po...
00:00 Soruya İlk Bakış
00:50 1. Çözüm Yöntemi O((N+K)LOGN)
--------------------------------------------
Time Complexity
1. Initial Heap Construction:
* The loop iterates over the classes array, which contains n elements (where n is the number of classes).
* For each class:
* The initial possible_inc is calculated in O(1)
* heapq.heappush() is called, which takes O(logn)
* Total time complexity for this phase: O(nlogn)
2. Extra Students Distribution:
* The loop runs k times (where k is the number of extraStudents).
* For each iteration:
* heapq.heappop() takes O(logn)
* Updating the class and calculating po...
Просмотров: 15
Видео
LeetCode 1029. Two City Scheduling Python İle Çözüm
Просмотров 1826 дней назад
Leet Code'da bulunan 1029 numaralı Two City Scheduling sorusunu Python ile çözdük. 00:00 Soruya İlk Bakış 00:50 1. Çözüm Yöntemi O(NLOGN) Time Complexity Iterates over the list costs, which contains N elements. Time complexity: Outer Loop: 𝑂(𝑁) Sorting refunds: The refunds list is sorted. Since there are 𝑁 elements in refunds, sorting takes 𝑂(𝑁log𝑁) Second Loop: Iterates over the first half of ...
LeetCode 2054. Two Best Non-Overlapping Events Python İle Çözüm
Просмотров 14Месяц назад
Leet Code'da bulunan 2054 numaralı Two Best Non-Overlapping Events sorusunu Python ile çözdük. 00:00 Soruya İlk Bakış 03:00 1. Çözüm Yöntemi O(N) 10:00 2. Çözüm Yöntemi O(NLogN)
SwiftUI: Creating TextField and SecureField
Просмотров 12Месяц назад
Learn how to create a TextField and SecureField in SwiftUI to take user input seamlessly! Perfect for login forms, sign-up screens, and more. Watch this quick tutorial to enhance your SwiftUI skills. #swiftui #iosdevelopment #ios #textfield
LeetCode 2109. Adding Spaces to a String Python İle Çözüm
Просмотров 16Месяц назад
Leet Code'da bulunan 2109 numaralı Adding Spaces to a String sorusunu Python ile çözdük. 00:00 Soruya İlk Bakış 01:13 1. Çözüm Yöntemi 13:40 2. Çözüm Yöntemi 16:50 3. Çözüm Yöntemi 21:53 String vs List
Leet Code 1346. Check If N and Its Double Exist Python İle Çözüm
Просмотров 54Месяц назад
Leet Code'da bulunan 1346 numaralı Check If N and Its Double Exist sorusunu Python ile çözdük. 00:00 Soruya İlk Bakış 01:00 1. Çözüm Yöntemi - O(N^2) 04:20 2. Çözüm Yöntemi - O(N^2) 07:00 3. Çözüm Yöntemi - O(N^2) 09:35 4. Çözüm Yöntemi - O(N)
Çok güzel çok faydalı bir video olmuş, çok teşekkürler
Güzel yorumunuz için çok teşekkür ederim 🙏🏻