Bloomberg Interview

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/4

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:32 PM on 1/10/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

5 Terms

1
New cards
<p>Merge Sorted Array</p>

Merge Sorted Array

class Solution:
    def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
        """
        Do not return anything, modify nums1 in-place instead.
        """
        last = m + n - 1

        p_one = m - 1
        p_two = n - 1

        while last >= 0:
            if p_one < 0:
                nums1[last] = nums2[p_two]
                p_two -= 1
            elif p_two < 0:
                    break
            elif nums1[p_one] > nums2[p_two]:
                nums1[last] = nums1[p_one]
                p_one -= 1
            else:
                nums1[last] = nums2[p_two]
                p_two -= 1
            
            last -= 1

2
New cards
<p></p>

class Solution:
    def merge(self, intervals: List[List[int]]) -> List[List[int]]:
        intervals.sort(key=lambda i: i[0])
        output = [intervals[0]]
        
        for one, two in intervals[1:]:
            lastend = output[-1][1]
            
            if one <= lastend:
                output[-1][1] = max(lastend, two)
            else:
                output.append([one, two])
        return output

3
New cards
term image
class Solution:
    def isValid(self, s: str) -> bool:
        stack = []
        pairs = {")" : "(", "}" : "{", "]" : "["}

        for char in s:
            if char in pairs:
                if stack and stack[-1] == pairs[char]:
                    stack.pop()
                else:
                    return False
            else:
                stack.append(char)
        
        return stack == []

4
New cards
term image
class Solution:
    def maxArea(self, height: List[int]) -> int:
        n = len(height)

        left = 0
        right = n - 1
        val = 0
        while right > left:
            water = min(height[left], height[right]) * (right - left)
            val = max(val, water)

            if height[right] > height[left]:
                left += 1
            else:
                right -= 1
        return val

5
New cards

Explore top notes

note
Key Stuff - All Ideologies
Updated 1017d ago
0.0(0)
note
Aniline differentiation
Updated 351d ago
0.0(0)
note
Chapter 27 - The Cold War
Updated 1441d ago
0.0(0)
note
CGO casus 4
Updated 434d ago
0.0(0)
note
Key Stuff - All Ideologies
Updated 1017d ago
0.0(0)
note
Aniline differentiation
Updated 351d ago
0.0(0)
note
Chapter 27 - The Cold War
Updated 1441d ago
0.0(0)
note
CGO casus 4
Updated 434d ago
0.0(0)

Explore top flashcards

flashcards
Unit 6 Gradesavers Kaji
47
Updated 1102d ago
0.0(0)
flashcards
patho chapter 5
31
Updated 1136d ago
0.0(0)
flashcards
Vocabulary Power Unit 3
42
Updated 414d ago
0.0(0)
flashcards
APUSH Unit 5
111
Updated 1176d ago
0.0(0)
flashcards
english final
53
Updated 104d ago
0.0(0)
flashcards
TUTTO PARZIALE 2
169
Updated 464d ago
0.0(0)
flashcards
troika chapter 4
68
Updated 1119d ago
0.0(0)
flashcards
Unit 6 Gradesavers Kaji
47
Updated 1102d ago
0.0(0)
flashcards
patho chapter 5
31
Updated 1136d ago
0.0(0)
flashcards
Vocabulary Power Unit 3
42
Updated 414d ago
0.0(0)
flashcards
APUSH Unit 5
111
Updated 1176d ago
0.0(0)
flashcards
english final
53
Updated 104d ago
0.0(0)
flashcards
TUTTO PARZIALE 2
169
Updated 464d ago
0.0(0)
flashcards
troika chapter 4
68
Updated 1119d ago
0.0(0)