sidhant kumarsidhantjaiswalsj-datastructures.hashnode.dev·Feb 11, 2025Understanding Arrays in Java: A Beginner's GuideWhat is Array? An array is a data structure that allows you to store multiple elements of the same data type in a contiguous block of memory. Each element can be accessed using an index. Arrays are dynamically created objects in java which means → C...Data-Structuresarray stack or heap
sidhant kumarsidhantjaiswalsj-datastructures.hashnode.dev·Feb 11, 2025DSA Community ChapterArrays/Lists problem on Leetcode Check out arrays in java notes at → Arrays Data-structure Notes in java 1. Two Sum 121. Best Time to Buy and Sell Stock 53. Maximum Subarray 3.sum 11. Container With Most Water 238.Product of Array Except Self 724. Fi...111 readsData-StructuresDSA
sidhant kumarsidhantjaiswalsj-datastructures.hashnode.dev·Feb 8, 2025How Bubble Sort Works: A Simple GuideLogic→ We take two nested loops the outer loop which will run from 0 to the length of items in array and the second loop running from 1 to the length of array - i times its doing so because if we run loop 1st time it will sort the loop keeping the bi...Data-Structuresbubble sort
Aman Kulshresthatechgyanic.com·Feb 8, 2025Maps in JavaPackage Used: java.util The Java Map interface is not a subtype of the Collection interface, so it behaves slightly differently from the other collection types. // Java Program Implementing HashMap import java.util.HashMap; import java.util.M...Java
Harshita Sharmaharshitawrites.hashnode.dev·Feb 6, 2025Check If an Array is a Subset of Another ArrayToday, I solved a basic array problem, but it gave me valuable insights into how my thought process works when approaching a problem. Simple questions like these help in analyzing problem-solving patterns. Thanks to my DSA interviewer, I was able to ...DSA
ROSS30-days-to-get-the-job.hashnode.dev·Feb 5, 2025Merge SortMerge sort follows divide and conquer approach for sorting.First we will divide the array then sort it and finally merge the array.Below is the code for merge sort. Copy and run this in java tutor site for better understanding. TC - O(n log n) SC- O(...sorting algorithms
Ganti Sai Sagarsdetinsider.hashnode.dev·Jan 28, 2025LinkedList as StackIn Java, Stack is a subclass of Vector, but it can be implemented using a LinkedList for better performance in some cases. Here's a practical way to use LinkedList as a stack: Why Use LinkedList for Stack? LinkedList provides efficient addFirst() an...DSA
Ganti Sai Sagarsdetinsider.hashnode.dev·Jan 28, 2025ArrayList vs StackBoth ArrayList and Stack are part of Java's java.util package, but they serve different purposes and have distinct characteristics: 1. Hierarchy ArrayList: Implements List interface directly. Stack: Extends Vector, which in turn implements the List...Collection Framework
Akshay Sharmadsa-deep-dive.hashnode.dev·Jan 28, 2025Understanding Data Structures and Algorithms: An IntroductionIn programming, one of the most essential concepts to learn is Data Structures and Algorithms (DSA). These concepts are the foundation of every software application, system, and optimization problem. Understanding DSA is vital for efficient coding, s...DSAwithakshay
fakhir hassanfakhirhassan.hashnode.dev·Jan 25, 2025Grouping Anagrams in Python: Brute Force vs Optimal ApproachAnagrams are words formed by rearranging the letters of another word, like "eat", "tea", and "ate". Grouping anagrams efficiently is a common coding challenge in interviews and competitive programming. In this article, we’ll explore two approaches: ...groupanagram