Brainstorming Meeting for LeetCode Questions

Date: October 1, 2021

dog

Quick little video to get your mood up


Links of unfinished LeetCode questions from last meeting


Explanation of LeetCode Problems from Last Meeting

LeetCode Merging Intervals

An efficient approach is to first sort the intervals according to the starting time. Once we have the sorted intervals, we can combine all intervals in a linear traversal. The idea is, in sorted array of intervals, if interval[i] doesn’t overlap with interval[i-1], then interval[i+1] cannot overlap with interval[i-1] because starting time of interval[i+1] must be greater than or equal to interval[i]. Following is the detailed step by step algorithm.

LeetCode Robot Bounded in Circle

The idea is to consider the starting position as (0, 0) and direction as East (We can pick any values for these). If after the given sequence of moves, we come back to (0, 0), then given sequence is circular, otherwise not.

LeetCode LRU Cache

Queue which is implemented using a doubly linked list. The maximum size of the queue will be equal to the total number of frames available (cache size). The most recently used pages will be near front end and least recently pages will be near the rear end. A Hash with page number as key and address of the corresponding queue node as value.


Attendance list from previous meeting
  1. Professor Powell: Attended
  2. Edwin Estuardo Lau Mack: Attended
  3. Gurpreet Singh: Attended
  4. Naweed Malal: Absent

Agenda of what the meeting will cover
  1. Finish the unfinished LeetCode questions from last meeting
  2. Move from medium questions to hard questions
  3. Start on our personal projects

Important business needed to be talked about

Form

Attendance: