Two Pointes blogs and articles
The two-pointer technique is an efficient algorithmic approach that uses two indexes to traverse data structures like arrays or strings. The pointers move toward each other, away from each other or in the same direction to solve problems involving searching, pair finding or window management. It reduces complexity, often turning O(n²) solutions into O(n), making it ideal for optimized problem-solving.
Two Pointes blogs
Longest Playlist With No Repeated Songs : Brute Force to Optimal
Find the longest playlist with no repeated songs using brute force, HashSet, and HashMap sliding window techniques, with Java code and dry runs.
BlogRead blog4 Sum | Find Quads that add up to a target value
BlogRead blogIntersection of Two Sorted Arrays
BlogRead blogSort an Array of 0s and 1s
BlogRead blogMove all Zeros to the end of the array
BlogRead blogRemove Duplicates from Sorted Array (In-Place)
BlogRead blogRemove N-th Node from the End of a Linked List | Java
BlogRead blogSliding Window Patterns in DSA: Complete Guide with Examples
BlogRead blog
Two Pointes articles
Sliding Window Algorithm : Beginners to Advanced Engineers
Sliding Window Algorithm, What is the Sliding Window Approach?, Why Use Sliding Window? Where to Use Sliding Window, How Sliding Window Works with Examples
ArticleRead articleWhat is Two Pointer Approach?
The two-pointer technique is a foundational pattern for solving array, string, and linked-list problems in linear (or near-linear) time with constant extra space
ArticleRead articleCheck if a Linked List is Palindrome
Palindrome Linked List | Check if a Linked List is Palindrome O(n) time and O(1) space | Fast & Slow Pointer Method with In-Place Second Half Reversal
ArticleRead articleLength of the Longest Substring Without Repeating Characters
Length of the Longest Substring Without Repeating Characters | Given a string str find the length of the longest substring without repeating characters | find the length of the longest substring without repeating characters in a given string |
ArticleRead articleRemove Duplicates from Sorted Array II
Given a sorted integer array in ascending order , remove all duplicates from this array so that each unique element appears at most twise in this array. also maintain relative order of the elements in array.
ArticleRead articleRemove Duplicates from Sorted Array
Given an integer sorted array (arr) in ascending order , remove all duplicates from this array so that each unique element appears only once in this array. also maintain relative order of the elements in array
ArticleRead articleMerge Sorted Array
You are given two integer arrays arr1 and arr2, sorted in accending order, and two integers m and n, representing the number of elements in arr1 and arr2 respectively. Merge arr1 and arr2 into a single array sorted in accending order.
ArticleRead article
Two Pointes: frequently asked questions
Quick answers about learning Two Pointes on DevBrainiac.
What is Two Pointes?
The two-pointer technique is an efficient algorithmic approach that uses two indexes to traverse data structures like arrays or strings. The pointers move toward each other, away from each other or in the same direction to solve problems involving searching, pair finding or window management. It reduces complexity, often turning O(n²) solutions into O(n), making it ideal for optimized problem-solving.
Where can I learn Two Pointes on DevBrainiac?
DevBrainiac has 7 articles and 8 blogs about Two Pointes. A good place to start is "Sliding Window Algorithm : Beginners to Advanced Engineers" and "What is Two Pointer Approach?".
Where can I ask Two Pointes questions?
Ask your Two Pointes question in the DevBrainiac Q&A community, where developers answer each other's questions.
What other topics can I learn on DevBrainiac?
Popular topics on DevBrainiac include System Design, DSA, C# Collection, Software Design and Database.
Popular topics
- System DesignSystem design is the process of defining the architecture, components, modules, interfaces and data flow of a system to meet specific requirements. It focuses on creating scalable, efficient and maintainable solutions, covering both high-level design (HLD) and low-level design (LLD). Essential for building reliable, high-performance software systems.Explore System Design
- DSADSA (Data Structures and Algorithms) is a fundamental concept in computer science that focuses on efficiently storing, organizing and processing data. Data structures like arrays, linked lists, stacks and trees manage data, while algorithms provide step-by-step solutions to problems. Mastering DSA is essential for writing optimized, scalable and high-performance code.Explore DSA
- C# CollectionIn C#, Collections are classes in the System.Collections and System.Collections.Generic namespaces that store and manage groups of related objects. They include types like List<T>, Dictionary<TKey,TValue>, Queue<T> and Stack<T>. Collections offer dynamic sizing, built-in search, sorting and iteration, making data handling efficient and flexible in C# applications.Explore C# Collection
- Software DesignSoftware design is the process of planning and structuring a software system’s architecture, components, interfaces, and data flow to meet functional and non-functional requirements. It ensures scalability, maintainability and performance. Key approaches include modular design, object-oriented design and architectural patterns like MVC and microservices for efficient, reliable software development.Explore Software Design
- DatabaseA database is an organized collection of data. It is the collection of schemas, tables, queries, reports, views, and other objects. The data are typically organized to model aspects of reality in a way that supports processes requiring information. Use this tag if you have questions about designing a database.Explore Database
- Language-ConceptsThis tag is used to understand a basic part of the language.Explore Language-Concepts
- SQLSQL stands for Structured query language. It is a programming language for storing and processing information in a relational database. It is standard language for accessing and manipulating databases.Explore SQL
- MethodA method is a block of code that performs a task.Explore Method
- Interview ExperienceAn interview experience is a detailed account of the interview process for a specific role, covering rounds, questions asked, difficulty level, preparation tips and personal insights to help future candidates understand what to expect and how to prepare effectively.Explore Interview Experience
- Distributed SystemA distributed system is a network of independent computers that work together to achieve a common goal. These systems share resources, process tasks in parallel and ensure fault tolerance. Used in cloud computing, databases and large-scale applications. They improve scalability, reliability and performance by distributing workloads across multiple nodes efficiently.Explore Distributed System
Keep practising Two Pointes
Test yourself with a quiz, run code in the online compiler or ask the community.