Leetcode

1609. Even Odd Tree

Binary trees serve as a fundamental data structure in computer science, offering versatile solutions to various problems. One such intriguing problem is determining whether a given binary tree is an Even-Odd Tree. In this blog post, we’ll embark on a journey to understand the concept of an Even-Odd Tree and delve into an algorithmic solution…

Leetcode

543. Diameter of Binary Tree

https://leetcode.com/problems/diameter-of-binary-tree/description Understanding the Problem: Before diving into the solution, let’s understand the problem statement. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root node. Approach and Code Explanation: To solve the diameter of a…

Tech

Leveraging JSON Files with cURL for Efficient Data Transfer

APIs (Application Programming Interfaces) play a crucial role in enabling communication between different software applications. cURL (Client URL) is a command-line tool widely used to transfer data with URLs, supporting various protocols including HTTP, HTTPS, FTP, and more. When dealing with APIs, often data exchange occurs in JSON (JavaScript Object Notation) format due to its…

Leetcode

1642. Furthest Building You Can Reach

Understanding the Problem: Imagine traversing a series of buildings, each with its own height. We’re equipped with a limited supply of bricks and ladders, and our goal is to reach as far as possible while conserving resources. The furthest building problem challenges us to determine the maximum distance we can travel given the heights of…

Tech

Summary of all SSO Related Concepts

Single Sign-On (SSO) has revolutionized the way users authenticate and access applications in today’s digital landscape. By providing a seamless authentication experience and improving security, SSO has become a cornerstone of modern identity and access management (IAM) solutions. In this blog, we’ll delve into the core concepts of SSO, including its benefits, key components and…

Leetcode

56. Merge Intervals

Understanding the Problem Given a collection of intervals represented as an array of pairs [start, end], the task is to merge overlapping intervals and return a new array of non-overlapping intervals. Approach To merge intervals efficiently, we can follow these steps: Create a class Interval to represent each interval with start and end attributes. Implement…

Leetcode

1463. Cherry Pickup II

We are given a grid where each cell represents the number of cherries available. Two robots start at the top-left corner of the grid and must traverse down to the bottom-right corner. Each robot can move only in three directions: down, right, or diagonally down-right. However, the robots cannot occupy the same cell at the…

Leetcode

279. Perfect Squares

The Perfect Squares problem is a classic dynamic programming challenge where the goal is to find the minimum number of perfect square numbers (numbers that can be expressed as the square of an integer) that sum up to a given positive integer ‘n’. In this blog, we’ll explore the problem, understand its intuition, and implement…

Pages