Fatima Jannatmahia.hashnode.dev·Aug 20, 2024Hashing - Algorithms for Competitive ProgrammingHashing provides a way to quickly access and store data, ensuring efficient lookups, inserts, and deletions. It reduces the time complexity for these operations to nearly constant time, making it crucial for applications like databases, caching, and ...DiscussPython Data Structure and AlgorithmHashing
Abhav Goelabhavgoel.hashnode.dev·Aug 2, 2024Binary lifting - Kth ancestor queriesBinary Lifting(DP on trees). Many of you must have heard about binary lifting and must have been intimidated by the thought of it(even i was). Then i thought to learn about the concept and write a blog for the same making things easier for the commun...DiscussC++
Dhruv Chouhandestroycompiler.hashnode.dev·Aug 1, 2024Binary Search on Answer - perfect_1This blog is a sequel to the blog https://hashnode.com/post/clz7xrmbw000j08l2ckev8a3x which explains the basic intuition, understanding and usage of binary search algorithm. This blog teaches the application of binary search in solving problems. Sol...Discuss·32 likes·144 readsBinary Search Algorithm
Dhruv Chouhandestroycompiler.hashnode.dev·Jul 30, 2024Binary Search - perfect_0Binary search is one of the most important algorithms of the world. This guide is for complete beginners and will help you understand and implement the binary search algorithm in code. It will explain the intuition behind binary search and teach you...Discuss·51 likes·304 readsBinary Search Algorithm
Madhav Ganesanmadhavganesan.hashnode.dev·Jul 22, 2024How to calculate time and space complexity?Finding time and space complexity for a problem might be very difficult until you read this blog:) Time complexity: The time complexity of an algorithm is the amount of time it takes for each statement to complete. Worst case: It is a scenario in whi...DiscussC++
Anower Hossainanower77.hashnode.dev·Jul 14, 2024Segment Tree-1Segment Tree Basic Node Divide With Segment Tree Node Numbering (Segment Tree) // build (node, begin, end) build (1, 1, N) { L = 2xN, R = (2xN) + 1 // Node Number Calculate mid = (begin + end) / 2 left = (L, begin, mid) left = (R, ...Discuss·134 readssegment-tree
Rachit Kesharirachitk.hashnode.dev·Jul 11, 2024127. Word LadderQue: A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s<sub>1</sub> -> s<sub>2</sub> -> ... -> s<sub>k</sub> such that: Every adjacent pair of words differs by a single let...DiscussJava
Anto Jebikshanantojebikshan.hashnode.dev·Jul 7, 2024Getting Started with Competitive Programming: A Guide for BeginnersIntroduction: Competitive programming is an exciting and rewarding activity that challenges your problem-solving skills and enhances your coding abilities. Whether you're a beginner looking to improve your programming skills or aiming to participate ...Discuss·2 likes·41 readsProgramming Blogs
Anower Hossainanower77.hashnode.dev·Jul 7, 2024Recursion & Backtracking1-Recursion-Basic #include "bits/stdc++.h" using namespace std; void solve(int n) { if(n==0) return; solve(n-1); cout<< n << " "; } int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n; cin>>n; solve(n); ...Discuss2-Tree-Recursion
Abrar Eyasireyasir2047.hashnode.dev·Jul 2, 2024Number of Divisors Using Prime FactorizationQuestion: Given a positive integer n, we must find the total number of divisors for n. Let d( n ) be the number of divisors for the natural number, n. We begin by writing the number as a product of prime factors: n = p^a* q^b* r ^c … then the number ...Discuss·1 likedivisors