Coding Interview Patterns - HashSet and HashMap

Nikhil Lohia July 14, 2025
Video Thumbnail
Nikhil Lohia Logo

Nikhil Lohia

View Channel

About

I want to share with you my knowledge, that I have gained all my life. I like to see every task in your day to day life as an interesting problem to solve, and if you can understand the requirements, solving for it can become somewhat intuitive. I try to explore certain aspects of day to day life and how I can make them easier for you. This involves daily hacks, tutorials, innovations, new discoveries, experiences and all the stuff I find amusing. As a software engineer myself, I also believe that good problem solving skills can help you overcome most of the barriers in life. Programming is one of them. If you know how to approach a problem, writing a code for it in any language could be a very typical task. With this channel I aim to focus on the way to solve a problem efficiently rather than just its implementation.

You May Also Like

Coding Interview Prep Essentials

AI-recommended products based on this video

Loading...
GOLDCHAMP Portable 4 Gas Monitor for H2S, CO, LEL & O2 with High-Sensitivity Sensor, Data Storage, Triple Alarms, Large-Capacity Battery, Triple-Proof Design & Large LCD Display for Industrial Safety

GOLDCHAMP Portable 4 Gas Monitor for H2S, CO, LEL & O2 with High-Sensitivity Sensor, Data Storage, Triple Alarms, Large-Capacity Battery, Triple-Proof Design & Large LCD Display for Industrial Safety

(0)
$111.14
FREE delivery Tue, Aug 12
Loading...
Hi.FANCY Portable Laptop Stand with Dual Cooling Fans for 14-17inch Laptops, Grey, 23.5 x 25.9 x 0.95cm

Hi.FANCY Portable Laptop Stand with Dual Cooling Fans for 14-17inch Laptops, Grey, 23.5 x 25.9 x 0.95cm

(0)
$36.99
FREE delivery Aug 18 - 28
Loading...
Laptop Stand, OMOTON Laptop Mount, Aluminum Laptop Holder Riser Stand for Desk, Compatible with MacBook Air/Pro, Dell, HP, Lenovo and All Laptops (10-15.6 inch),Silver

Laptop Stand, OMOTON Laptop Mount, Aluminum Laptop Holder Riser Stand for Desk, Compatible with MacBook Air/Pro, Dell, HP, Lenovo and All Laptops (10-15.6 inch),Silver

(9,083)
$22.99
200+ bought in past month
Loading...
BESIGN LSX7 Laptop Stand with 360° Rotating Base, Ergonomic Adjustable Notebook Stand, Riser Holder Computer Stand Compatible with Air, Pro, Dell, HP, Lenovo More 10-15.6" Laptops (Black) Recycled Claim Standard Blended

BESIGN LSX7 Laptop Stand with 360° Rotating Base, Ergonomic Adjustable Notebook Stand, Riser Holder Computer Stand Compatible with Air, Pro, Dell, HP, Lenovo More 10-15.6" Laptops (Black) Recycled Claim Standard Blended

(3,511)
$29.99
400+ bought in past month
Loading...
Zewwen Laptop Stand for Desk, Ergonomic Adjustable Foldable Computer Stand with Heat-Vent, Aluminium Alloy Laptop Riser Compatible with MacBook Air, Pro, Dell XPS, Samsung, 10”-16"

Zewwen Laptop Stand for Desk, Ergonomic Adjustable Foldable Computer Stand with Heat-Vent, Aluminium Alloy Laptop Riser Compatible with MacBook Air, Pro, Dell XPS, Samsung, 10”-16"

(1,679)
$28.49
FREE delivery Sat, Jun 14 on your first order
500+ bought in past month
Loading...
Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

(43,809)
$14.99$11.99
FREE delivery Mon, Sep 22 on your first order
1K+ 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...
Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black
Best Seller

Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black

(38,516)
$39.98$35.98
FREE delivery Thu, Sep 4
500+ 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...
Dell UltraSharp 24 Monitor - U2424H

Dell UltraSharp 24 Monitor - U2424H

(43)
$309.44$262.14
FREE delivery Aug 22 - 25Only 8 left in stock.
Loading...
Dell UltraSharp U2723QE 27" 4K UHD WLED LCD Monitor - 16:9 - Black, Silver EPEAT

Dell UltraSharp U2723QE 27" 4K UHD WLED LCD Monitor - 16:9 - Black, Silver EPEAT

(13)
$699.99$650.99
FREE delivery Tue, Oct 7
50+ bought in past month
Loading...
Dell UltraSharp U2725QE 27' 4K Thunderbolt-Hub-Monitor mit Bildwiederholfrequenz Von 120Hz

Dell UltraSharp U2725QE 27' 4K Thunderbolt-Hub-Monitor mit Bildwiederholfrequenz Von 120Hz

(50)
$1,059.91
FREE delivery Oct 7 - 8
Loading...
NA to Clamp, Quick Release NA to Rail Lock Clamp with 1/4in 3/8in Thread, Standard NA to Clamp Adapter for Camera Cage Friction Arm Ball Head Cold Shoe Microphone Monitor

NA to Clamp, Quick Release NA to Rail Lock Clamp with 1/4in 3/8in Thread, Standard NA to Clamp Adapter for Camera Cage Friction Arm Ball Head Cold Shoe Microphone Monitor

(0)
$12.69
FREE delivery Jun 27 - Jul 10
Loading...
NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)

NEEWER Advanced 18 inch LED Ring Light for Phone, LCD Touch Screen, 2.4G Remote Lights Control, 3200-5600K, Tripod Light for iPhone Action Camera, for Studio Makeup TikTok YouTube Video Salon (Black)

(2,807)
$181.49
FREE delivery Sun, Aug 10
Loading...
HOMIEE HOMIEE 15.6-Inch Laptop Backpack, High-Capacity Backpack for Men Women USB Charging Port Travel/Business/College Backpack, Blue

HOMIEE HOMIEE 15.6-Inch Laptop Backpack, High-Capacity Backpack for Men Women USB Charging Port Travel/Business/College Backpack, Blue

(1,409)
$37.99
PrimeFREE delivery Sat, Jun 14
Loading...
RAOYI 5Pack 64GB USB Flash Drive USB Stick USB 2.0 Memory Stick Slide Retractable Thumb Drive 64G USB Drive USB Key for Data Storage (Black Red Blue Green Purple)

RAOYI 5Pack 64GB USB Flash Drive USB Stick USB 2.0 Memory Stick Slide Retractable Thumb Drive 64G USB Drive USB Key for Data Storage (Black Red Blue Green Purple)

(4,402)
$26.09
Prime
1K+ bought in past month
Loading...
RAOYI 5pcs 32GB USB 3.0 Flash Drive Memory Stick Fold Storage Thumb Stick Pen Drive U Disk Swivel Design (5 Mixed Colors: Black Red Blue Green Purple)

RAOYI 5pcs 32GB USB 3.0 Flash Drive Memory Stick Fold Storage Thumb Stick Pen Drive U Disk Swivel Design (5 Mixed Colors: Black Red Blue Green Purple)

(1,667)
$31.99
FREE delivery Sat, Jun 14 on your first order
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...
Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

(103,365)
$13.49
5K+ bought in past month
Loading...
Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified

Anker USB C Charger Cable (6ft 100W, 2Pack), USB 2.0 Type C Fast Charging Cable for iPhone 15 / 15Pro / 15Plus / 15ProMax MacBook Pro 2020, iPad Pro 2020, iPad Air 4, Samsung Galaxy S23+/S23 Ultra ClimatePartner certified

(44,904)
$17.99
FREE delivery Wed, Aug 20 on your first order
6K+ bought in past month
Loading...
Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More

Anker 332 USB-C Hub (5-in-1) with 4K HDMI Display, 5Gbps - and 2 5Gbps USB-A Data Ports and for MacBook Pro, MacBook Air, Dell XPS, Lenovo Thinkpad, HP Laptops and More

(11,639)
$23.99
FREE delivery Sat, Jun 14 on your first order
1K+ bought in past month
Loading...
Bose QuietComfort Wireless Noise Cancelling Headphones, Bluetooth Over Ear Headphones with Up to 24 Hours of Battery Life, Moonlight Grey - Limited Edition

Bose QuietComfort Wireless Noise Cancelling Headphones, Bluetooth Over Ear Headphones with Up to 24 Hours of Battery Life, Moonlight Grey - Limited Edition

(12,251)
$269.00
FREE delivery Tue, Oct 14