Aditya Chatterjee's Blog, page 181
January 21, 2021
ResNet50 v1.5
ResNet50 v1.5 is the modified version of the original ResNet50 model. ResNet50 v1.5 is slightly more accurate (0.5%) and slightly lower performance (down by 5%) compared to ResNet50.
Hence, ResNet50 v1.5 is used in applications where the slight improvement in accuracy matters and the small performance bottleneck is not an issue.
The difference in the architecture of ResNet50 and ResNet50 v1.5 is that, in the bottleneck blocks which requires downsampling, v1 has stride = 2 in the first 1x1 convol...
January 20, 2021
Minimum steps to make binary string empty by removing alternating subsequence in each step
Given a string str consisting of only '0's and '1's, the task is to make the string empty by performing minimum number of operations. An operation is defined as the removal of an alternating subsequence from str without changing the order of the remaining characters. An alternating subsequence is defined as any subsequence in str, of at least length 1, where no two consecutive characters are equal. Ex: "0", "1", "10", "01", "101", etc.
Examples Input: str = "1011" Output: 2 Explanati...Digit Separators in C++
In this article we are going to discuss about Digit Separators in C++. This topic is introduced in C++14. Using digit separators in the code make it easy for human readers to parse large numeric values.
Problem DetectionAs we can see, everyone around us is in fond of comfort so when it comes to read a number having many digits, it seems sometimes difficult.
For example : Reading a number like 1000 is easy but when the number is like 1000000 it becomes little difficult and uncomfortable to read ...
Minimum elements to be removed from array to make the sum even
Given an array of integer and you have to find minimum no of integers or elements from array need to be removed so that sum of all elements of array results an even value.
The first thing which comes in mind is that sum can be even only if number of odd terms are even. If number of odd terms are odd sum will result in odd value.
As we know -
No issue with number of even values in array either they are odd times or e...
Algorithm behind Bill splitting app

In this article, we have explored the algorithms that are used to design a Bill splitting app. Bill Splitting app is a really simple project idea which is inspired by Splitwise App. So what basically is an Splitwise App?
Splitwise is an App which makes it easy to split bills with friends and family. They organize all your shared expenses in one place so that everyone can see who they owe.
For example, there are group of friends (Yusuf, Harshit, Himanshu, and Yash) and they have made expenses a...
January 18, 2021
System Design of File Uploading Service
In this article, we'll be discussing things we're supposed to keep in mind while designing a web-based file uploading service, handling and restricting the number of uploads by the user, how to handle version history in the database, and efficiently come up with a design.
Now, I'm sure most of us must have used Google Drive or Dropbox for uploading your files and sharing it across the web if we think about it, how does the internal system work for these applications? What all to keep in mind if ...
Heavy Light Decomposition of tree

Heavy Light Decomposition,a competitive programming algorithm is very useful in solving queries efficiently. We will see its usecase, implementation and finally solve few problems based on it.
Basic Terms:Segment treesHeavy Light Decomposition is an interesting topic and it needs quite a few prequisites which we will be covering through.
Segment trees store the sum of elements of an array and are broken down as they move down.
So the array given is of size 5.HereA[x:y] denotes the sum of a...
Soft heap
Soft heap is a variant of heap data structure (priority queue). It is a powerful data structure owing to amortized constant time complexity of some basic functions.
Following are the 5 operations that have an amortized constant time complexity
create(S): Create a new soft heapinsert(S,x): Insert an element in the soft heapmeld(S1,S2): Merge the 2 soft heaps to get onedelete(S,x): Delete an element from the soft heapfindMin(S): Get the minimum element in the soft heapIt merits to beat the ...
January 17, 2021
Basics of CSS (Cascading Style Sheets)

Cascading Style Sheets (CSS) is a style sheet language which is used for designing the webpages and their layouts developed in a markup language like HTML. In this article, you will learn how to use CSS in your projects and some of its basic and most useful CSS properties and rules to design your websites.
Note: Before starting to learn CSS, make sure you have a basic understanding of HTML and its tags. Besides that, no other prerequisites for this tutorial.
But, why CSS?In the early 90s, when ...
Longest Decreasing Subsequence using Dynamic Programming
In this problem (Longest Decreasing Subsequence), you are given an array of length N. You have to find the longest decreasing subsequence (LDS) from the given array. The longest decreasing subsequence problem is to find a sequence in which the subsequence's elements are in highest to lowest order and the subsequence is as long as possible. We will try to solve this problem using Dynamic Programming which will take O(n²) time complexity.
For example, consider below subsequence
[15, 27, 14, 38, 63...