Recent Posts
Shortest Distance All Buildings
You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only move up, down, left and right. You are given a 2D grid of values 0, 1 or 2, where:
Each 0 marks an empty land which you can pass by freely. Each 1 marks a building which you cannot pass through. Each 2 marks an obstacle which you cannot pass through.
read more
Count the Repetitions
Problem Statement: Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc", 3] ="abcabcabc”.
On the other hand, we define that string s1 can be obtained from string s2 if we can remove some characters from s2 such that it becomes s1. For example, “abc” can be obtained from “abdbec” based on our definition, but it can not be obtained from “acbbe”.
read more
My First Post
Welcome, this is the blog where I’ll be posting algo related content
#include <iostream> using namespace std; int main() { cout << "Hello world!"; return 0; }
read more