Meeting Rooms, is a LeetCode problem from sorting subdomain. In this post we will see how we can solve this challenge in Swift

Problem Description

You can find the full details of the problem Meeting Rooms at LeetCode


Time Complexity: O(nlogn), Space Complexity: O(1)

Definition for an interval.

public class Interval {

public var start: Int

public var end: Int

public init(_ start: Int, _ end: Int) {

self.start = start

self.end = end



Please check the main.swift snippet for the solution.

This solution originally posted at: Github by @soapyigu