sidequests

  • Problem Statement
  • Approach 1
  • Approach 2
  • Solution
  • Notes
home

❯

list of leetcode problems

Given n appointments, find all conflicting appointments

Jul 30, 20221 min read

  • dsadeck
  • bst

Problem Statement

Given n appointments, find all conflicting appointments - GeeksforGeeks

Pattern:


Approach 1

Create Points Datastructure, and sort all the points, and the other point they belong to Iterate add overlapping interval to a Set<Interval<Point, Point>

class Point { 
	int val;
	boolean isStart;
	Point other;
}

Approach 2

Interval Tree - GeeksforGeeks

Solution

<% tp.file.cursor(2) %>

TC : <% tp.file.cursor(3) %> SC : <% tp.file.cursor(4) %>

Notes


Graph

Backlinks

  • MOC DSA Questions
  • GitHub
  • Linkedin
  • Twitter