Anish sharmalearneasyway.hashnode.dev·3 hours agoStackA stack is a linear data structure that follows the first-in-last-out principle. This means the last element added to the stack will be the first one removed. A stack is similar to an array, but in a stack, you control how data is added and removed. ...stack
Ashish kumarpatternweek1.hashnode.dev·Dec 22, 202410 Stunning Patterns in C++ You Should Try!IntroductionProgramming is not just about solving problems; it’s also about exploring creativity. Patterns in programming help improve logic-building skills, enhance problem-solving abilities, and make learning enjoyable. This week, I explored 10 exc...LogicBuilding
Gourab Dasgdcademy.hashnode.dev·Dec 20, 2024Comprehensive Guide to Priority Queue: Algorithms, Pseudo Code, Implementation, and Complexity Analysis1. Simple Queue (Linear Queue) Description: A simple queue follows the FIFO principle, where elements are added at the rear and removed from the front. It uses a fixed-size array to implement the queue, and once full, no new elements can be added. ...10 likesqueue
Gourab Dasgdcademy.hashnode.dev·Dec 19, 2024ADT QueueDefinition: A queue is an Abstract Data Type (ADT) that follows the FIFO principle (First In, First Out). This means elements are added from one end, called the rear, and removed from the other end, called the front. Characteristics of a Queue: Line...10 likes·42 readsqueue
Kumar Pallavkumarpallav.dev·Dec 19, 20243Sum Closest - Step-by-Step with JavaProblem Statement The problem asks us to find three numbers in an array whose sum is closest to a given target value. Example Input: nums = [-1, 2, 1, -4], **target = 1 **Expected Output**:2` Approach We can solve the problem using the Two Pointer T...Data Structure & Algorithmstwo pointers
Legos Lightlegos.hashnode.dev·Dec 19, 2024Một số ứng dụng của CTDL Stack💡 Stack (ngăn xếp) là một cấu trúc dữ liệu cơ bản. Giống như Queue (hàng đợi), stack được dùng để giải quyết rất nhiều bài toán thú vị. Bài viết này mình xin giới thiệu vài ví dụ về việc áp dụng stack để giải quyết. Giới thiệu Cũng như queue, stac...Programming & Algorithmsstack
Gourab Dasgdcademy.hashnode.dev·Dec 18, 2024Applications of StacksExpression Conversion and evaluation–corresponding algorithms and complexity analysis. Levels of Precedence of Arithmetic Operations In arithmetic expressions, operator precedence determines the order in which operations are performed. Operators with...9 likes·58 readsDSA Navigator: Your Exam Companionpolishnotation
Reuben D'souzareubendsouza.hashnode.dev·Dec 18, 2024Stacks And Queues - IInfix To Postfix Conversion import java.util.Stack; public class InfixToPostfix { public static void main(String[] args){ String infix = "(A+B)*(C-D)"; String postfix = convertInfixToPostfix(infix); System.out.println(po...DSA
Gourab Dasgdcademy.hashnode.dev·Dec 17, 2024Stack OperationsIntroduction to Stack A Stack is a linear data structure that follows the Last In, First Out (LIFO) principle.It supports the following operations: Push: Add an element to the top of the stack. Pop: Remove the top element from the stack. Peek/Top:...12 likes·62 readsDSA Navigator: Your Exam Companionmakaut
Saumyaa Gargsaumyaagarg.hashnode.dev·Dec 17, 2024Day 21: Heaps BasicsHeaps are powerful tree-based data structures designed for efficient priority handling, making them indispensable in optimization problems and real-time systems. Today’s exploration focused on understanding the heap property, implementing heaps using...10 likesWeek 3DSA