Fatima Jannetmahia.hashnode.dev·Aug 30, 2024Learn Divide & Conquer AlgorithmHello, good people! Are you ready to dive into the exciting world of the Divide & Conquer Algorithm? Let's get started! What is Divide and Conquer Algorithm? Divide and conquer is an algorithm design paradigm which works by recursively breaking down ...1 likePython Data Structure and Algorithm - DSAdivide and conquer
Haneunhanlee.hashnode.dev·Jul 22, 2024LeetCode 1518. Water Bottles Java SolutionProblem Description Problem: LeetCode 1518. Water Bottles Description: We have numBottles water bottles. We can exchange numExchange empty bottles for one new full water bottle. The goal is to calculate the maximum number of water bottles we can dr... LeetCode 1518. Water Bottles
Haneunhanlee.hashnode.dev·Jul 18, 2024LeetCode 2582. Pass the Pillow Java SolutionProblem Description Problem: https://leetcode.com/problems/pass-the-pillow/description/ Description: People are standing in a circle numbered from 1 to n. Person 1 holds a pillow and every hour they pass the pillow to the person to their right. If ...2582. Pass the Pillow
Haneunhanlee.hashnode.dev·Jul 17, 2024LeetCode 2058. Find the Minimum and Maximum Number of Nodes Between Critical Points Java SolutionProblem Description Problem: LeetCode 2058. Nodes Between Critical Points Description: Given a singly linked list, we need to find the minimum and maximum distance between nodes that are local maxima (a value greater than its neighbors) or local mi...2058. Find the Minimum and Maximum Number of Nodes Between Critical Points
Haneunhanlee.hashnode.dev·Jul 15, 2024LeetCode 1701. Average Waiting Time Java SolutionProblem Description Problem: https://leetcode.com/problems/average-waiting-time/ Description: The task is to calculate the average waiting time for all customers, considering each customer's arrival time and cooking time. Each customer can start th...1701. Average Waiting Time
Haneunhanlee.hashnode.dev·Jul 11, 2024LeetCode 1598. Crawler Log Folder Java Problem SolutionProblem Description Problem: LeetCode 1598 Description: Calculate the depth of the file system directory based on the given log array. "./" represents the current directory, and "../" represents the parent directory. Approach Idea: Traverse the ... 1598. Crawler Log Folder
Haneunhanlee.hashnode.dev·Jul 9, 2024LeetCode 1823: Find the Winner of the Circular Game Java SolutionProblem Description Problem: LeetCode 1823: Find the Winner of the Circular Game Description: There are n people standing in a circle, numbered from 1 to n. They play a game in which every k-th person is eliminated in a circular manner until only o...1823. Find the Winner of the Circular Game
Haneunhanlee.hashnode.dev·Jul 6, 2024LeetCode 2181. Merge Nodes in Linked List Java SolutionProblem Description Problem: https://leetcode.com/problems/merge-nodes-in-between-zeros/ Description: Given a single linked list, the task is to merge nodes according to specific conditions. Add node's values until it reaches 0. 0-3-4-0-5-3-0 to 7...LeetCode 2181. Merge Nodes in Linked List
Haneunhanlee.hashnode.dev·Jul 4, 2024LeetCode 1509. Minimum Difference Between Largest and Smallest Value in Three Moves Java SolutionProblem Description Problem: Minimum Difference Between Largest and Smallest Value in Three Moves Description: You need to remove up to 3 numbers from an integer array to minimize the difference between the largest and smallest values of the remain...1509. Minimum Difference Between Largest and Smallest Value in Three Moves
Haneunhanlee.hashnode.dev·Jul 3, 2024LeetCode 2319. Check if Matrix Is X-Matrix Java SolutionProblem Description Problem: Check if Matrix is X-Matrix Description: Determine if a given square matrix is an X-matrix. An X-matrix has all elements zero except those on the main diagonal and the anti-diagonal. Approach Idea: To check if each e...2319. Check if Matrix Is X-Matrix