Posts
Bhargav Lad
Cancel

219. The Skyline Problem

The Skyline Problem Problem Link 1. Divide and Conquer The divide and conqure solution can be thought from base case when we have two buildings, one in left and one in right.This is the smallest...

Docker Primer

Docker 3 basic concepts of Docker Containers A container is what we eventually want to run and host in Docker.From a conceptual point of view, a container runs inside the Docker host isolated fr...

Mordern C++ Tricks

Initalization with {} The initialization of variables was uniform in C++11. {} initalization is always applicable {} init prevents narrowing conversion of implicit conversion of arithmetic...

Mongoose CheatSheet

Mongoose Operations Cheat sheet Schema Types String Boolean Number Date Array Buffer Schema.Types.Mixed Schema.Types.ObjectId const UserSchema = new mongoose.Schema({ fullna...

First missing positive

Given an unsorted integer array nums, find the smallest missing positive integer. Follow up: Could you implement an algorithm that runs in O(n) time and uses constant extra space.? Example 1: In...

TypeORM CheatSheet

Setting up TypeORM: Cheatsheet [TOC] Connect with database const conn = await createConnection({ type: "postgres", host: "", port: 5432, database: "exmapleschema", // database name ...

Best Time to Buy and Sell Stock III

Best Time to Buy and Sell Stock III Best Time to Buy and Sell Stock III Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the max...

Non-overlapping Intervals

Non-overlapping Intervals leetcode link Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. **Exampl...

Visualize Sorting Algorithm using React

Introduction We all have implemented some sorting algorithm in school or maybe at work. We all have also learned the differences between these algorithms in terms of their time complexity, but mos...

20 Days of openCV - Day 1

20 Days of openCV - Day 1 This blog is based on Ardrian R. Face detection with OpenCV and deep learning - PyImageSearch post Introduction We already know that openCV ships out-of-the-box with pr...