Recursive Thinking in Haskell: Practical Examples

Sep 9, 2024
187 views

Discussion (0)


More from the writer

Mar 18, 2025

Same Binary Tree | LeetCode

d q, return true if the trees are equivalent, otherwise return false.Two binary trees are considered equivalent if they share the exact same structure and the nodes

BrainDump avatarBrainDump
Read more
Mar 18, 2025

Subtree of Another Tree

same tree as a given subtree.So before we solve this problem, we need to know how to check if two trees are same.IsSameTree algoFundamentally, we need to check a certain part of a tree and see if it i

BrainDump avatarBrainDump
Read more
Mar 18, 2025

Binary Search Tree | Subset of Binary Tree

ring things?We know using a hash-table we have O(1) for look up, then why study Binary Search Tree?Why is this better than hash table?Binary search tree preserves relationships, just like you would no

BrainDump avatarBrainDump
Read more
Mar 18, 2025

Balanced Binary Tree | Neetcode

s height-balanced and false otherwise.A height-balanced binary tree is defined as a binary tree in which the left and right subtrees of every node differ in height by no

BrainDump avatarBrainDump
Read more
Mar 18, 2025

MaxDepth VS Diameter of Binary Search Tree

you how efficient your BST operations will beOperations like search, insert, delete take O(h) time, where h is heightA balanced tree with minimal depth = faster operationsIf your BST has height much

BrainDump avatarBrainDump
Read more
Feb 7, 2025

A Large Scale analysis of Borrow pattern.

that focuses on speed, memory safety, and parallelism. It was developed by Mozilla and has been gaining popularity for its ability to provide memory safety without using a garbage collector.Why Shoul

BrainDump avatarBrainDump
Read more
Feb 3, 2025

Last Stone Weight | Heap | Priority Queue

p;where stones[i] represents the weight of the ith stone.We want to run a simulation on the stones as follows:At each step we choose the two heaviest stones, with weight 

BrainDump avatarBrainDump
Read more

recommended for you