## Data Structure and Algorithms in Doodles

She designed a graphic book explaining concepts like Data Structures and Algorithms Credits: Tomomi Imura

## 735. Asteroid Collision – Leetcode – Java – Explanation

Problem statement We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning … Read More

## Evaluate String Expression Java | InFix Expression Evaluation Java

Evaluate an expression represented by a StringThe expression can contain parentheses, you can assume parentheses are well-matched. For simplicity, you can assume only binary operations allowed are +, -, *, … Read More

## Two Sum – LeetCode

1. Two Sum Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and … Read More

## Best Time to Buy and Sell Stock – LeetCode – Solution

121. Best Time to Buy and Sell Stock – Solution You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by … Read More

## Two sum problem | Solution

Problem: Two Sum | LeetCode Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would … Read More

## Implement custom Array List in Java

Custom Dynamic Array class in Java

## Max Area of Island | Leetcode 695

You are given an m x n binary matrix grid. An island is a group of 1‘s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by … Read More

## Leetcode – 164. Maximum Gap

Given an integer array nums, return the maximum difference between two successive elements in their sorted form. If the array contains less than two elements, return 0. You must write an algorithm that … Read More

## Print binary tree in zigzag order | 103. Binary Tree Zigzag Level Order Traversal Leetcode

Write a program to print ZigZag order traversal of a binary tree. For the below binary tree the zigzag order traversal will be 1 3 2 4 5 6 7. Given … Read More