Invert Binary Tree - Leetcode 226 - Trees (Python)

Greg Hogg November 22, 2024
Video Thumbnail
Greg Hogg Logo

Greg Hogg

View Channel

About

Hey there - my name is Greg Hogg, a statistics alumni from the University of Waterloo in Ontario, Canada. I'm an ex-AI researcher who's published medical papers with Deepbreathe.ai, a startup that continues to win awards in the US military due to my and other's research. I still do AI contracts with companies like Nvidia, HP, and other big names today. I'm most known as a popular coding teacher online for interview skills like DSA and System Design, with over 150 million organic views and 650k+ followers in the space. My day job is running MLNOW Inc (which owns Algomap.io), where I help busy individuals get into the world's best software engineering roles at companies like FAANG. My company's website Algomap has over 75,000 users and a personalized live program tailored to cracking FAANG.

You May Also Like

Coding Essentials for Python Enthusiasts

AI-recommended products based on this video

Loading...
Apple 2025 MacBook Air 13-inch Laptop with M4 chip: Built for Apple Intelligence, 16GB Unified Memory, 256GB SSD Storage, Touch ID; Sky Blue - English Keyboard

Apple 2025 MacBook Air 13-inch Laptop with M4 chip: Built for Apple Intelligence, 16GB Unified Memory, 256GB SSD Storage, Touch ID; Sky Blue - English Keyboard

(687)
$1,249.99
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
TP-Link USB C To Ethernet Adapter (UE300C) - J45 To USB C [Thunderbolt 3/4 Compatible] Type-C Gigabit Ethernet LAN Network Adapter, Compatible With Apple MacBook Pro 2017-2023, MacBook Air, And More

TP-Link USB C To Ethernet Adapter (UE300C) - J45 To USB C [Thunderbolt 3/4 Compatible] Type-C Gigabit Ethernet LAN Network Adapter, Compatible With Apple MacBook Pro 2017-2023, MacBook Air, And More

(11,192)
$12.99$10.39
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
Laptop Sleeve Case 11–14 Inch MacBook Air MacBook Pro Surface Laptop Dell XPS 13 HP Envy Pavilion Lenovo Yoga Slim IdeaPad Acer Swift Chromebook Samsung Galaxy Book Shockproof Leather Bag Colour Blue

Laptop Sleeve Case 11–14 Inch MacBook Air MacBook Pro Surface Laptop Dell XPS 13 HP Envy Pavilion Lenovo Yoga Slim IdeaPad Acer Swift Chromebook Samsung Galaxy Book Shockproof Leather Bag Colour Blue

(98)
$81.45
Loading...
Gumdrop ProTech Case for Dell New XPS 13 Plus 9320 Laptop- Slim Lightweight Case with Energy Displacement Protection, Non-Skid Rubber Feet and Frosted Exterior for Bumps and Drops (Black)

Gumdrop ProTech Case for Dell New XPS 13 Plus 9320 Laptop- Slim Lightweight Case with Energy Displacement Protection, Non-Skid Rubber Feet and Frosted Exterior for Bumps and Drops (Black)

(49)
$109.43$108.34
FREE delivery Aug 11 - 13
Loading...
65W 45W USB C Laptop Charger Compatible with Dell Latitude 5420 5430 5520 5530 7340 7430 Inspiron 14 16 XPS 13 Chromebook 3100 Dell Computer Type C Fast Charging AC Adapter Power Cord

65W 45W USB C Laptop Charger Compatible with Dell Latitude 5420 5430 5520 5530 7340 7430 Inspiron 14 16 XPS 13 Chromebook 3100 Dell Computer Type C Fast Charging AC Adapter Power Cord

(7)
$19.99
FREE delivery Sun, Aug 24 on your first order
Loading...
45W 65W AC Adapter Laptop Charger for Dell Inspiron 15 14 13 17 3000 5000 7000 Series 5558 5559 Charger Latitude E6440 E6430 3520 3420 XPS 13 14 9333 9350 Notebook Dell Computer Power Supply Cord

45W 65W AC Adapter Laptop Charger for Dell Inspiron 15 14 13 17 3000 5000 7000 Series 5558 5559 Charger Latitude E6440 E6430 3520 3420 XPS 13 14 9333 9350 Notebook Dell Computer Power Supply Cord

(52)
$13.99
FREE delivery Sun, Aug 24 on your first order
100+ bought in past month
Loading...
Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black
Best Seller

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

(17,871)
$27.98$22.38
FREE delivery Tue, Oct 14 on your first order
500+ bought in past month
Loading...
Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

(21,223)
$44.98
FREE delivery Tue, Oct 14
1K+ bought in past month
Loading...
Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

(26,678)
$259.99$194.99
FREE delivery Wed, Aug 20
5K+ bought in past month
Loading...
3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods Global Recycled Standard

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods Global Recycled Standard

(30,415)
$30.39
Prime
1K+ bought in past month
Loading...
3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods (Blue) Global Recycled Standard

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods (Blue) Global Recycled Standard

(27,328)
$39.99
PrimeFREE delivery Sat, Jun 14
100+ bought in past month
Loading...
Wireless Charger for iPhone- 3 in 1 Charging Station for iPhone 16/15/14/13/12/Pro Max/Pro/Mini/Plus, Apple Watch 10/9/8/7/SE/6/5/4/3/2/1/Ultra2/Ultra, AirPods pro/2/3/4

Wireless Charger for iPhone- 3 in 1 Charging Station for iPhone 16/15/14/13/12/Pro Max/Pro/Mini/Plus, Apple Watch 10/9/8/7/SE/6/5/4/3/2/1/Ultra2/Ultra, AirPods pro/2/3/4

(27)
$27.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Toddler Kitchen Tower, Learning Standing Tower, 4-in-1 Kitchen Black Wooden Stool Helper with Chalkboard Montessori and Waldorf Helper for Kids in Kitchen

Toddler Kitchen Tower, Learning Standing Tower, 4-in-1 Kitchen Black Wooden Stool Helper with Chalkboard Montessori and Waldorf Helper for Kids in Kitchen

(12)
$89.99
FREE delivery Sat, Jun 28
50+ bought in past month
Loading...
Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

(382)
$94.95
PrimeFREE delivery Sat, Jun 14
Loading...
10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

(1)
$99.99
FREE delivery Mon, Aug 11
Loading...
ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

(49)
$117.29$102.21
$6.86 delivery Thu, Aug 14
Loading...
7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

(61)
$68.99
FREE delivery Tue, Aug 12
Loading...
BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

(288)
$54.14
FREE delivery Sun, Jun 22