nCr table | HackerRank Solution [Medium] Jim is doing his discrete maths homework which requires him to repeatedly calculate nCr(n choose r) for different values of n Dynamic Programming, Mathematics
Max Min | HackerRank Solution [Medium] Given a list of integers, arr, and a single integer k. Create an array of size k from elements of arr such that its unfairness is minimum Arrays
Common Child | Algorithms | HackerRank Solution [Medium] Given two strings p and q of equal length, what’s the longest string that can be constructed such that it is a child of both? Dynamic Programming
Generate Parentheses – LeetCode Solution [Medium] Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Competitive Programming
Sum of Left Leaves in Binary tree – LeetCode Solution [Easy] Given the root of a binary tree, return the sum of all left leaves. Number of nodes in the tree lie in the range – [1, 1000] Trees
Counting Bits O(n) Solution – LeetCode [Easy] | Brian Kernighan’s Algorithm Given an integer n, return an array ans of length n + 1 such that for each i (0 Algorithms, Competitive Programming, Mathematics
Longest Substring Without Repeating Characters – LeetCode Solution [Medium] Given a string s, consisting of English letters, symbols and spaces, find the length of the longest substring without repeating characters. Competitive Programming, Hashmaps
Lowest Common Ancestor of a Binary Search Tree – LeetCode Solution [Easy] The lowest common ancestor is defined between two nodes p and q as the lowest node in Tre that has both p and q as descendants. Trees
Invert Binary Tree Solution in C++ – LeetCode [Easy] Given the root of a binary tree, invert the tree, and return its root. Trees
Substring Diff | HackerRank (Algorithms) | Longest Common Substring Given two strings and an integer, determine the length of the longest common substrings of the two strings that differ in no more than k positions. Competitive Programming, Dynamic Programming