Thu. Sep 19th, 2024

Month: April 2020

How to Dockerize a Django 3.0 Web Application

We will dockerize a Django web application in this post and for this we will consider the django application which we built in the previous post. In my previous post,…

LeetCode – Tree – Invert Binary Tree

Invert a binary tree. Example: Input: 4 / \ 2 7 / \ / \ 1 3 6 9 Output: 4 / \ 7 2 / \ / \ 9…

LeetCode – Tree – Leaf-Similar Trees

Consider all the leaves of a binary tree. From left to right order, the values of those leaves form a leaf value sequence. For example, in the given tree above,…

LeetCode – Tree -Sum of Root To Leaf Binary Numbers

Given a binary tree, each node has value 0 or 1. Each root-to-leaf path represents a binary number starting with the most significant bit. For example, if the path is…

How to build a basic Django 3.0 application

There are various python web frameworks and Django is one of the most popular ones. If we compare Django with Flask, we can say full-stack vs lightweight. If you want…

LeetCode – Arrays – Lucky Integer in an Array

Given an array of integers arr, a lucky integer is an integer which has a frequency in the array equal to its value. Return a lucky integer in the array.…

LeetCode – Arrays – Find the Distance Value Between Two Arrays

Given two integer arrays arr1 and arr2, and the integer d, return the distance value between the two arrays. The distance value is defined as the number of elements arr1…

LeetCode – Strings – Is Subsequence

Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s and…

LeetCode – Strings – Remove Palindromic Subsequence

Given a string s consisting only of letters 'a' and 'b'. In a single step you can remove one palindromic subsequence from s. Return the minimum number of steps to…

LeetCode – Strings – Minimum Number of Steps to Make Two Strings Anagram

Given two equal-size strings s and t. In one step you can choose any character of t and replace it with another character. Return the minimum number of steps to…