Binary Tree Mirror and Rotation Solution
This is a solution to create the mirror image and perform rotations (left and right) on a binary tree.
This is a solution to create the mirror image and perform rotations (left and right) on a binary tree.
This is a solution to the Binary Tree In Order Traversal problem on LeetCode.
Backtracking
In this tutorial we will explore one of the fundamental data structure in computer science: Binary Tree
Bit Manipulation is a technique used in a variety of problems to get the solution in an optimized way. This technique is very effective from a Competitive Programming point of view. It is all about Bitwise Operators which directly works upon binary numbers or bits of numbers that help the implementation fast. Below are the Bitwise Operators that are used:
Dynamic Programming is mainly an optimization over plain recursion. Wherever we see a recursive solution that has repeated calls for the same inputs, we can optimize it using Dynamic Programming. The idea is to simply store the results of subproblems so that we do not have to re-compute them when needed later. This simple optimization reduces time complexities from exponential to polynomial.
Greedy Algorithm is defined as a method for solving optimization problems by taking decisions that result in the most evident and immediate benefit irrespective of the final outcome. It works for cases where minimization or maximization leads to the required solution.
Introduction
1. 46. Permutations
1. Number of 1 Bits - Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight).
Here is a list of some popular LeetCode dynamic programming problems:
1. Jump Game
Questions
This is a solution to the Binary Tree Level Order Traversal problem on LeetCode.
This is a solution to the Binary Tree Post Order Traversal problem on LeetCode.
This is a solution to the Binary Tree Pre Order Traversal problem on LeetCode.