LeetCode 207 - Course Schedule

Post thumbnail
Post thumbnail
Prompt: There are n numbers of courses you need to take. Each course is represented by an integer id from 0 to n-1. There is also a list of prerequisites represented by an 2xn array, [[a0,b0],[a1,b1],[a2,b2],…,[an-1,bn-1]], where bi is a prerequisite of ai. Given n number of courses, is it... [Read More]

LeetCode 198 - House Robber

Post thumbnail
Post thumbnail
Prompt: Given a list of numbers [i0 , i1 , i2 , … , in], each number represents the amount of money there is in a house. There are n houses with the index being the position of each house. Since there are security cameras in all houses and they... [Read More]
Tags: Leetcode DP

LeetCode 11 - Container With Water

Post thumbnail
Post thumbnail
Prompt: Given a list of heights [a0 , a1 , a3 , … , an], find two heights that create a container that gives the maximum volume of water with the width of the container being the index of the first height to the index of the second height. [Read More]
Tags: Leetcode DP