Skip to content

Prepare For Coder Interview – Denny

  • Basic
  • Medium
  • Hard
  • Architect
  • Life

Review: Interval Problems

Posted on January 18, 2018July 26, 2020 by braindenny

Interval Problems



Top Questions

Name Example
Two ways to check whether two intervals overlap min(y1, y2) > max(x1, x2); x1<y2 && x2>y1
Two types of intervals [x, y] vs [x, y)
Interval problems usually solved by heap or greedy algorithms LeetCode: Car Pooling
General idea of overlapping interval problems Sort intervals, maintain an active set, loop each intervals
Sort by pointx is common. But sometimes need to sort by pointy LeetCode: Minimum Number of Arrows to Burst Balloons
Typical problems: Interval conflict – Detect double booking LeetCode: My Calendar I
Typical problems: Interval conflict – Detect triple booking LeetCode: My Calendar II
Typical problems: Interval conflict – Detect K booking LeetCode: My Calendar III, LeetCode: Car Pooling
Typical problems: Interval List Intersections LeetCode: Interval List Intersections
Typical problems: Interval List Union LeetCode: Insert Interval
  • CheatSheet: Leetcode For Code Interview
  • CheatSheet: Common Code Problems & Follow-ups

See all interval problems: #interval

  • Review: Interval Problems
  • LintCode: Time Intersection
  • LintCode: Interval Search
  • LintCode: Digital Coverage
  • LeetCode: Teemo Attacking
  • LeetCode: Smallest Range II
  • LeetCode: Smallest Range I
  • LeetCode: Non-overlapping Intervals
  • LeetCode: My Calendar III
  • LeetCode: My Calendar II
  • LeetCode: My Calendar I
  • LeetCode: Missing Ranges
  • LeetCode: Minimum Number of Arrows to Burst Balloons
  • LeetCode: Merge Intervals
  • LeetCode: Meeting Rooms
  • LeetCode: Insert Interval
  • LeetCode: Find Right Interval
  • LeetCode: Employee Free Time

See more blog posts.

linkedin
github
slack

Post Views: 5
Posted in ReviewTagged #interval, review

Post navigation

LeetCode: Judge Route Circle
Review: TwoPointers Problems

Leave a Reply Cancel reply

Your email address will not be published.

Tags

#array #backtracking #bfs #binarytree #bitmanipulation #blog #classic #codetemplate #combination #dfs #dynamicprogramming #game #graph #greedy #heap #inspiring #interval #linkedlist #manydetails #math #palindrome #recursive #slidingwindow #stack #string #subarray #trie #twopointer #twosum binarysearch editdistance hashmap intervaldp knapsack monotone oodesign presum rectangle redo review rotatelist series sql treetraversal unionfind

Recent Posts

  • a
  • a
  • a
  • a
  • a

Recent Comments

    Archives

    Categories

    • Amusing
    • Basic
    • Easy
    • Hard
    • Life
    • Medium
    • Resource
    • Review
    • Series
    • Uncategorized
    Proudly powered by WordPress | Theme: petals by Aurorum.