MSMahin Shardainmahincodes.hashnode.devDay 1: Array Fundamentals & Optimization (Striver A2Z)1. Largest Element in Array Finding the maximum value in a single traversal. Logic: Initialize a largest variable with the first element of the array. Optimal Approach: Iterate through the array onc7h ago·2 min read
YYashrajinyashrajxdev.blogGraph in DSA What is a Graph? A Graph is a data structure used to represent relationships between different entities. It consists of: Vertices (Nodes) → Represent entities Edges → Represent connections between n6d ago·4 min read
Hhimanshuinblogs-himanshu.hashnode.devDay 20 - Search in Rotated Sorted ArrayQuestion You are given an array of length n which was originally sorted in ascending order. It has now been rotated between 1 and n times. For example, the array nums = [1,2,3,4,5,6] might become: [36d ago·3 min read
KMKaushal Mauryainkaushalm.hashnode.devTop K Frequent Elements — When HashMaps Start Earning Their SalaryGiven an integer array nums and an integer k, return the k most frequent elements within the array. The test cases are generated such that the answer is always unique. Example 1: Input: nums = [1,2,2,Feb 26·2 min read
SSSk Shoyebinskshoyebjavascript.hashnode.devRat In A Maze Problem SolvedJavaScript BacktrackingIn this article we will solve Rat in a maze problem with backtracking. The rat start point is (0,0) and exit point is (n-1, n-1). The rat can move to 1 and 0 is blocked. Diagram Code class Solution Feb 26·3 min read
SSSk Shoyebinskshoyebjavascript.hashnode.devAll String Permutations - Backtracking Method - JavaScript SolutionIn this article we will solve the all string permutation problem with javascript by backtracking method. We will generate the solution tree and write the code accordingly, Solution Tree Code class Feb 24·2 min read
ANAvinash Negiindsawithpython.hashnode.devGraphs: I Was Right — It Was Going to Be Hard Day 20 of my DSA journey. Before starting graphs, I had a feeling. Not excitement. Not curiosity. A quiet dread. This one is going to be hard. I was right. What Is a Graph? A graph is a collection ofFeb 24·6 min read
JRJaya Rani YSinjayalloyd.hashnode.devHow I Used Karumanchi’s DSA Book to Build a Strong Java FoundationWhy I Chose This Book While preparing Data Structures and Algorithms using Java, I wanted a resource that was structured, logic-focused, and not just interview-pattern based. That’s when I picked Feb 23·2 min read
MSMuppidi Srinivasinsrinivastechblog.hashnode.devMastering Fenwick Tree for Competitive ProgrammingWhile reading, don’t overthink or get stuck. Just follow along with the flow—you’ll understand everything step by step as we go. Given ArrayIndex : 0 1 2 3 4 5 6Array : 3 2 Feb 23·11 min read
Hhimanshuinblogs-himanshu.hashnode.devDay 19 - Find Minimum in Rotated Sorted ArrayQuestion You are given an array of length n which was originally sorted in ascending order. It has now been rotated between 1 and n times. For example, the array nums = [1,2,3,4,5,6] might become: [3Feb 23·3 min read