Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pa:laboratoare:laborator-00 [2025/02/24 23:00]
darius.neatu [Exercitii]
pa:laboratoare:laborator-00 [2025/03/06 22:57] (current)
darius.neatu [Exercitii]
Line 119: Line 119:
 2. Pentru fiecare din elementele următoarele,​ dacă acesta este mai mare decât minimul din heap, se șterge minimul și se adaugă elementul curent. Mereu în heap avem k elemente la final de pas în această etapă. 2. Pentru fiecare din elementele următoarele,​ dacă acesta este mai mare decât minimul din heap, se șterge minimul și se adaugă elementul curent. Mereu în heap avem k elemente la final de pas în această etapă.
  
-3. Răspunsul este minimul din heap la finalul parcurgerii. Complexitate este de $ O(n log k) $.+3. Răspunsul este minimul din heap la finalul parcurgerii. ​ 
 + 
 +Complexitate este de $ O(n log k) $, care este mai bunăImplementați și testați pe Leetcode!
  
 </​spoiler>​ </​spoiler>​
  
-  * **Task02**Rezolvați problema [[https://​leetcode.com/problems/​sliding-window-maximum/​| Sliding Window Maximum]].+<spoiler Soluția 3> 
 +HintSoluția 2 nu este optimă! Se poate ș$O(n)$, dar considerăm că este înafara scopului laboratorului 0. 
 +</spoiler>
  
-  * **Task03**: Rezolvați problema [[https://​leetcode.com/​problems/​longest-substring-without-repeating-characters| Longest Substring without repeating characters]].+  * **Task02**: Discutați problema [[https://​leetcode.com/​problems/​sliding-window-maximum/​| Sliding Window Maximum]] și problema [[https://​leetcode.com/​problems/​longest-substring-without-repeating-characters| Longest Substring without repeating characters]]. Implementați și testați cel puțin o problemă.
  
-  * **Task04**: Rezolvați problema [[https://​leetcode.com/​problems/​min-stack/​description/​| Min Stack]].+  * **Task03**: Rezolvați problema [[https://​leetcode.com/​problems/​min-stack/​description/​| Min Stack]].
pa/laboratoare/laborator-00.1740430821.txt.gz · Last modified: 2025/02/24 23:00 by darius.neatu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0