Open in app

Sign In

Write

Sign In

Shaila Nasrin
Shaila Nasrin

23 Followers

Home

About

Apr 14, 2021

Validate Binary Search Tree

The problem states that we will be given a binary tree and we have to determine if it is a valid binary search tree(BST) or not. you can find this problem in Leetcode and in Hackerrank. First of all, what is a binary tree? A binary tree is a tree…

Bst

6 min read

Validate Binary Search Tree
Validate Binary Search Tree
Bst

6 min read


Jun 20, 2020

Recursion

Most of us know what recursion is and can write recursive code if we are asked to. But when we try to solve advance problems(i.e binary tree, binary search tree etc.) and see recursive solutions, we get confused about how that code is working, so in this post, I will…

Recursion

5 min read

Recursion
Recursion
Recursion

5 min read


Dec 12, 2019

Least Recently Used(LRU) Cache Problem Part1

The problem asks you to build a caching(cache is something that stores computation for lookups or it may also store redundant data for quick access to speed up future requests) system that has all the usual cashing features(i.e insert, delete, search) but it has the ability to get rid of…

Programming

3 min read

Least Recently Used(LRU) Cache Problem Part1
Least Recently Used(LRU) Cache Problem Part1
Programming

3 min read


Oct 12, 2019

How C++ works

The basic workflow of c++ code is: source file-> compiler -> executable binary file. But how do we get to the executable binary file from source code? Let's see a c++ code first: What is in the Source file? The first thing we see in the above code is…

Programming

3 min read

How C++ works
How C++ works
Programming

3 min read


Sep 15, 2019

Shifted Binary Search Problem

The problem asks you to find a number from a sorted array but all the numbers has been shifted by some amount either left or right.For Example:{9, 19, 21, 2, 8} the array is sorted from index 0 to 2 and then we have the value 2 which is less…

Programming

3 min read

Shifted Binary Search Problem
Shifted Binary Search Problem
Programming

3 min read


Sep 7, 2019

C++ STL

In this post I’m not doing in depth discussion on how these standard libraries works behind the scene. I will just show what they do and how to use them. Sort sort: It orders the elements from beginning to end in O(nlogn) complexity. By default it the elements in ascending order…

C Plus Plus Language

4 min read

C++ STL
C++ STL
C Plus Plus Language

4 min read


Aug 1, 2019

Longest Common Subsequence (LCS) DP Problem

A subsequence is a group of characters that appears sequentially but it doesn’t have to be contiguous though it can be. For example s = “AFPKL” in this string valid sub-sequences can be “AFP”, “APK”, “AFKL” etc. So, the problem is asking us to return the sequence of the longest…

Algorithms

4 min read

Longest Common Subsequence (LCS)
Longest Common Subsequence (LCS)
Algorithms

4 min read


Jul 25, 2019

Binary Search Tree Implementation in C++

Binary search tree(BST) is a kind of binary tree(tree where each node has at most 2 child nodes) where any node of the tree will be less than all its right children and greater than all its left children. For Instance To implement BST will implement three things that we…

Programming

3 min read

Binary Search Tree Implementation in C++
Binary Search Tree Implementation in C++
Programming

3 min read


Jul 14, 2019

Edit Distance DP Problem

Edit distance problems is: if we are given two string word1 and word2 what is the minimum number of operation needed to transform a into b. The operations are: substitution, insertion and deletion. You can find this problem in interviewbit and leetcode. In order to solve this problem, we have…

Algorithms

5 min read

Edit Distance DP Problem
Edit Distance DP Problem
Algorithms

5 min read


Jul 6, 2019

BFS Implementation in C++

What is Breadth First Search(BFS)? BFS is a graph traversal method that traverses the graph iterative way level by level. That means it traverses the graph “breadth first”, starting from the source then the neighbor of the source then the next level and so on. For example: If we traverse…

C

4 min read

BFS Implementation in C++
BFS Implementation in C++
C

4 min read

Shaila Nasrin

Shaila Nasrin

23 Followers

Software Engineer

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech