LC986

Interval a = [s1, e1], b = [s2, e2]
If s2 <= e1 and s1 <= e2 then,
overlap interval = [max(s1, s2), min(e1, e2)]

--

--

--

Study notes.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Deploying EC2 instance using Terraform

[Leet Code] Find Largest Value in Each Tree Row

Python — Why 1.__str__() is invalid syntax

Just another post singing Vim’s praises

Rust 101 — The Syntax and Basics

Jenkins Pipeline with Groovy

OIL Reacting Higher Perfectly From Elliott Wave Blue Box Area

Backup MySQL Databases in Kubernetes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Eddie Dong

Eddie Dong

Study notes.

More from Medium

Spiral Matrix — Problem solution

Linked Lists — What are they?

Diff between (a+b)/2 and a+(b-a)/2

An Introduction to Linked Lists