Given an integer array arr, return the length of the longest strictly increasing subsequence. Strictly increasing sequence is a sequence such that all elements of the sequence are sorted in increasing order.
Strassen’s Algorithm for Matrix multiplication is a recursive algorithm for multiplying n x n matrices. Strassen’s algorithm is based on a familiar design technique – Divide & Conquer.
In the last post we learnt about Binary Search Trees and basic operations like insert and search on them. In this post we’ll learn about some complex operations on them.
Logan has to travel through a road having hills of different heights. Also each hill has a cave to pass through it, to avoid travelling extra distance of a hill. Logan wants to travel through this road by taking at most K caves.
Given the roots of two binary trees root and rootSub, check if there is a subtree of root with the same structure and node values as rootSub.
A subtree of a tree T is a tree S consisting of a node in T and all of its descendants in T.