<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Data Structures and Algorithms DSA - Medium]]></title>
        <description><![CDATA[Problems, Solutions, and Complexity Analyses of Data Structures and Algorithms - Medium]]></description>
        <link>https://medium.com/data-structures-and-algorithms-dsa?source=rss----04a2e681bc9c---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Data Structures and Algorithms DSA - Medium</title>
            <link>https://medium.com/data-structures-and-algorithms-dsa?source=rss----04a2e681bc9c---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 08:13:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/data-structures-and-algorithms-dsa" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/introduction-80a626d44b0d?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/80a626d44b0d</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-develop]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 22:48:31 GMT</pubDate>
            <atom:updated>2025-06-26T23:36:51.277Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ip4rhB4oD681QM-WO0dTKw.png" /><figcaption>Data Structures and Algorithms</figcaption></figure><p>Data structures and algorithms (DSA) are need-to-know skills for software engineers. This series analyzes the solutions and complexities of DSA problems. See below for links to the featured categories of data structures and algorithms in the series.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/sliding-windows-23727d654d8a">Sliding Windows</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/two-heaps-1cafc6d0ef39">Two Heaps</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/k-way-merge-10fcb84661f5">K-way Merge</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/top-k-elements-e4e6643eb7d2">Top K Elements</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/modified-binary-search-c5cc1c71a5c5">Modified Binary Search</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/subsets-415a98cbb7bc">Subsets</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/greedy-techniques-1191967c51c0">Greedy Techniques</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/backtracking-eff87a3b5d00">Backtracking</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/dynamic-programming-4744e5653ca8">Dynamic Programming</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/cyclic-sort-d8d37284bdc0">Cyclic Sort</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/topological-sort-3b6bbaf83397">Topological Sort</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/matrices-5f8d54af9416">Matrices</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/stacks-6f36eaa4191a">Stacks</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/graphs-a952a51c5861">Graphs</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/depth-first-search-7a46feb6ffdf">Depth First Search</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/breadth-first-search-e33939b988e9">Breadth First Search</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/tries-b0e48a6f307b">Tries</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/hash-maps-ad87a06d14c6">Hash Maps</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/counters-a2fcd3da83b2">Counters</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/union-find-98e2df0877a3">Union Find</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/two-pointers-0f8561d167fd">Two Pointers</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/fast-and-slow-pointers-7efd27bd375f">Fast and Slow Pointers</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/merge-intervals-32d3bf785e6b">Merge Intervals</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/linked-lists-0ef5dc363fde">Linked Lists</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms">GitHub - davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=80a626d44b0d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/introduction-80a626d44b0d">Introduction</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linked Lists]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/linked-lists-0ef5dc363fde?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/0ef5dc363fde</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[linked-lists]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:20:04 GMT</pubDate>
            <atom:updated>2025-06-26T23:03:24.769Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iTiIy7j1GU5jgfQWz_rN0Q.png" /><figcaption>Linked Lists</figcaption></figure><p>Linked lists are a linear data structure, and at times a problem asks to modify the structure of a linked list such as to reorder the linked nodes. In-place modification of a linked list allows a linked list to be modified without using additional memory. Consider using in-place modification of a linked list as a solution if a problem meets the following conditions.</p><ul><li>Linked list restructuring: Input data is given as a linked list, and the problem asks to modify its structure without modifying the data of nodes</li><li>In-place modification: The problem asks that at most constant additional memory be used</li></ul><p>See below for samples of data structures and algorithms problems that use linked lists as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/reverse-linked-list-f897d13ac78f">Reverse Linked List</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/reverse-linked-list-ii-9f19de8662ac">Reverse Linked List II</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/reorder-list-1f447852e724">Reorder List</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/swapping-nodes-in-a-linked-list-5e833d10574f">Swapping Nodes in a Linked List</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/swap-nodes-in-pairs-655e389cebaa">Swap Nodes in Pairs</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/linked_lists">data_structures_algorithms/algorithms/linked_lists at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ef5dc363fde" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/linked-lists-0ef5dc363fde">Linked Lists</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Merge Intervals]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/merge-intervals-32d3bf785e6b?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/32d3bf785e6b</guid>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[merge-intervals]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:19:48 GMT</pubDate>
            <atom:updated>2025-06-26T23:03:00.039Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EOkyFvyNeYjEaAexUH1m4A.png" /><figcaption>Merge Intervals</figcaption></figure><p>Merge intervals deals with problems that involve overlapping intervals, where each interval is represented by a start and end time. It involves tasks such as merging intersecting intervals, inserting new intervals into existing sets, or finding the minimum number of intervals needed to cover a range. The key to merge intervals is to understand how two intervals can overlap: nonoverlapping, partially overlapping, or completely overlapping.</p><p>Consider using merge intervals as a solution when a problem meets the following conditions.</p><ul><li>Array of intervals: Input data is an array of intervals</li><li>Overlapping intervals: The problem asks to deal with overlapping intervals</li></ul><p>See below for samples of data structures and algorithms problems that use merge intervals as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/merge-intervals-ad9c9fbfd75f">Merge Intervals</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/interval-list-intersections-d4e59784b10a">Interval List Intersections</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/meeting-rooms-ii-ff232291b24e">Meeting Rooms II</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/merge_intervals">data_structures_algorithms/algorithms/merge_intervals at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32d3bf785e6b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/merge-intervals-32d3bf785e6b">Merge Intervals</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fast and Slow Pointers]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/fast-and-slow-pointers-7efd27bd375f?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/7efd27bd375f</guid>
            <category><![CDATA[two-pointers]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:19:30 GMT</pubDate>
            <atom:updated>2025-06-26T23:02:33.098Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G8SjOtatq3LBhffNLH0_mQ.png" /><figcaption>Fast and Slow Pointers</figcaption></figure><p>Fast and slow pointers use two pointers to traverse an iterable data structure at different speeds to identify patterns such as cycles. Its concern is often to identify a pattern or structure in data rather than data values. The key idea is that two pointers start at the same position, and then for each iteration the slow and fast pointers walk forward one and two steps respectively.</p><p>Consider using fast and slow pointers as a solution when a problem meets the following conditions.</p><ul><li>Linear data structure: Input data is linear such as an array, linked list, or string</li><li>Cycle or intersection detection: The problem asks to find a cycle in a data structure, or intersection between two data structures</li><li>Middle element: The problem asks to find the middle element of a data structure, or similar position, e.g. the element at the first third, second third, etc position of a data structure</li></ul><p>See below for samples of data structures and algorithm problems that use fast and slow pointers as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/linked-list-cycle-2e5175c332c4">Linked List Cycle</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/middle-of-the-linked-list-f8947d6e5c8e">Middle of Linked List</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/palindrome-linked-list-4a1c287d4db6">Palindrome Linked List</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/fast_and_slow_pointers">data_structures_algorithms/algorithms/fast_and_slow_pointers at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7efd27bd375f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/fast-and-slow-pointers-7efd27bd375f">Fast and Slow Pointers</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two Pointers]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/two-pointers-0f8561d167fd?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/0f8561d167fd</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[two-pointers]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:19:05 GMT</pubDate>
            <atom:updated>2025-06-26T23:02:08.689Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ha9CBOQcQ_H-Id6mD5iKtQ.png" /><figcaption>Two Pointers</figcaption></figure><p>Two pointers involves maintaining two pointers that traverse a data structure. Whenever there’s a requirement to find two elements in an array that meet a certain condition, consider using two pointers as a solution. The pointers can be used to iterate through the data structure in one or both directions.</p><p>Consider using two pointers as a solution when a problem meets the following conditions.</p><ul><li>Linear data structure: Input data is linear such as an array, linked list, or string</li><li>Process pairs: The problem asks to process elements at two different positions simultaneously</li><li>Dynamic pointers: Both pointers move independently of each other according to certain criteria</li></ul><p>See below for samples of data structures and algorithms problems that use two pointers as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/valid-palindrome-1fbff21cdd52">Valid Palindrome</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/sum-of-three-values-852c9c932484">Sum of Three Values</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/remove-nth-node-from-end-of-list-af5c81ea3338">Remove nth Node from End of List</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/reverse-words-in-a-string-75245d2afd31">Reverse Words in a String</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/valid-palindrome-ii-705bfd7ccb3a">Valid Palindrome II</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/two_pointers">data_structures_algorithms/algorithms/two_pointers at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f8561d167fd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/two-pointers-0f8561d167fd">Two Pointers</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Union Find]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/union-find-98e2df0877a3?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/98e2df0877a3</guid>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[union-find]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:18:27 GMT</pubDate>
            <atom:updated>2025-06-26T23:01:44.283Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EF0b8feep-BsLs0iD4u_Tg.png" /><figcaption>Union Find</figcaption></figure><p>A union find is used to group elements of a collection into disjoint sets. Each disjoint set is a tree data structure whose root is called a representative of that set. A union find has two main operations: union and find. The union operation unions two disjoint sets into one. Whereas, the find operation finds the representative of a disjoint set.</p><p>An optimization of a union find is to use union by rank and path compression. Union by rank uses the size of each disjoint set to union the elements of the smaller set into the larger set, and so minimize the length of the path of each element to the representative of the disjoint set. Path compression is used to update the parent of elements to be the representative of the disjoint set, and so minimize the length of the path of elements to the representative of the disjoint set. Both optimizations together bring the time complexity of union find operations to amortized O(⍺(n)) where ⍺ is the inverse Ackerman function which is constant for all reasonable sizes of n.</p><p>Consider using union find as a solution when a problem meets the following conditions.</p><ul><li>Property based grouping: The problem asks to group elements together based on a shared property</li><li>Graph data organization: The problem has data that’s best represented as a graph but isn’t in the form of an adjacency list/matrix</li></ul><p>See below for samples of data structures and algorithms problems that use union find as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/redundant-connection-78184596be63">Redundant Connection</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/number-of-islands-14787a985f64">Number of Islands</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/longest-consecutive-sequence-d0886d6db7d6">Longest Consecutive Sequence</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/regions-cut-by-slashes-ec74b42e9a39">Regions Cut Slashes</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/accounts-merge-de14b496c0c4">Accounts Merge</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/union_find">data_structures_algorithms/algorithms/union_find at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98e2df0877a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/union-find-98e2df0877a3">Union Find</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Counters]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/counters-a2fcd3da83b2?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/a2fcd3da83b2</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[counter]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:18:04 GMT</pubDate>
            <atom:updated>2025-06-26T23:01:17.390Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v21OBtNSvKtzQp90WoPvuQ.png" /><figcaption>Counters</figcaption></figure><p>Counters are used to count the frequencies of elements in a collection, and using that information in an algorithm to solve a problem. Such an algorithm can be broken down into two parts: count and then compute. Problems that can be solved with counters include finding the most fequent element, finding elements that occur only once, and finding if two collections are copies of each other.</p><p>Consider using counters as a solution when a problem meets the following conditions.</p><ul><li>Frequency tracking: A problem asks to count the frequencies of elements in a collection individually or in combinations</li><li>Fixed set of possibilities: A problem asks for output from a fixed set of possibilities, e.g. true/false, yes/no, player1/player2</li></ul><p>See below for samples of data structures and algorithms problems that use counters as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/palindrome-permutation-6d08af93cd8e">Palindrome Permutation</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/valid-anagram-2dfea0732191">Valid Anagram</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/group-anagrams-09f8b46f3e03">Group Anagrams</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/maximum-frequency-stack-26c78d2b738c">Maximum Frequency Stack</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/first-unique-character-in-a-string-b6b5a92ba5a4">First Unique Character in a String</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/ransom-note-4d59789f8ea3">Ransom Note</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/counters">data_structures_algorithms/algorithms/counters at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2fcd3da83b2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/counters-a2fcd3da83b2">Counters</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hash Maps]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/hash-maps-ad87a06d14c6?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/ad87a06d14c6</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[hashmap]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:17:33 GMT</pubDate>
            <atom:updated>2025-06-26T23:00:53.439Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cNh0kbMS8oaU4s8jvaiHiA.png" /><figcaption>Hash Maps</figcaption></figure><p>A hash map is a data structure that stores key-value pairs. Hash maps use a hash function to compute an index for each key. The index determines where the corresponding value will be stored.</p><p>Consider using hash maps as a solution when a problem meets the following conditions.</p><ul><li>Fast data access: Repeated fast data access is needed during execution of an algorithm</li><li>Pair-wise relation: Storage of the relationships between two sets of data is needed</li></ul><p>See below for samples of data structures and algorithms problems that use hash maps as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/logger-rate-limiter-52f23664f339">Logger Rate Limiter</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/next-greater-element-7180de29e4a7">Next Greater Element</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/isomorphic-strings-957aa4276a2a">Isomorphic Strings</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/longest-palindrome-a2da1a0bfd27">Longest Palindrome</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/hashmaps">data_structures_algorithms/algorithms/hashmaps at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad87a06d14c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/hash-maps-ad87a06d14c6">Hash Maps</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tries]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/tries-b0e48a6f307b?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/b0e48a6f307b</guid>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[trie]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-structures]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:17:12 GMT</pubDate>
            <atom:updated>2025-06-26T23:00:26.541Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rc4ToHAo9t4oUM9J8ycE4w.png" /><figcaption>Tries</figcaption></figure><p>A trie is a tree data structure used to store and find strings from a set. Strings are stored in the set character by character, and the order of characters in a string is represented by edges between adjacent nodes. This way, additional space isn’t required to store strings with common prefixes. Also, tries are structured such that they can become wide and short, which reduces time required to find a string.</p><p>Consider using tries as a solution when a problem meets the following conditions.</p><ul><li>Partial matches: Desire to compare multiple strings to detect partial matches of prefixes</li><li>Space optimization: Desire to optimize space used to store a dictionary of words</li></ul><p>See below for samples of data structures and algorithms problems that use tries as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/implement-trie-1d7fd47327fc">Implement Trie</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/trie">data_structures_algorithms/algorithms/trie at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0e48a6f307b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/tries-b0e48a6f307b">Tries</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breadth First Search]]></title>
            <link>https://medium.com/data-structures-and-algorithms-dsa/breadth-first-search-e33939b988e9?source=rss----04a2e681bc9c---4</link>
            <guid isPermaLink="false">https://medium.com/p/e33939b988e9</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[breadth-first-search]]></category>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ethan Davis]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 19:16:49 GMT</pubDate>
            <atom:updated>2025-06-26T22:59:51.087Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPnqn7---IYg72ee7XxAMA.png" /><figcaption>Breadth First Search</figcaption></figure><p>Breadth first search (BFS) of a tree explores a tree level by level starting from the root node. Nodes directly connected to the root node are considered to be at level 1, nodes directly connected to level 1 nodes are considered to be at level 2, and so on. Traversal within a level doesn’t strictly have to be from left to right.</p><p>Consider using breadth first search as a solution when a problem meets the following conditions.</p><ul><li>Tree data structure: Input data is a tree</li><li>Not a wide tree: If the tree to be searched is wide, then the time complexity of breadth first search may be slow</li><li>Level-by-level traversal: The problem asks for the level order traversal</li><li>Solution near the root: There’s reason to believe the solution is near the root node</li></ul><p>See below for samples of data structures and algorithms problems that use breadth first search as a solution.</p><ul><li><a href="https://medium.com/data-structures-and-algorithms-dsa/binary-tree-zigzag-level-order-traversal-02fdf314a127">Binary Tree Zigzag Level Order Traversal</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/vertical-order-traversal-of-binary-tree-f7cc0f9e202c">Vertical Order Traversal of Binary Tree</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/symmetric-tree-f7a9599129e3">Symmetric Tree</a></li><li><a href="https://medium.com/data-structures-and-algorithms-dsa/connect-all-siblings-of-a-binary-tree-25f34f968ad3">Connect All Siblings of Binary Tree</a></li></ul><h3>Links</h3><ul><li><a href="https://github.com/davisethan/data_structures_algorithms/tree/main/algorithms/bfs">data_structures_algorithms/algorithms/bfs at main · davisethan/data_structures_algorithms</a></li><li><a href="https://www.educative.io/courses/grokking-coding-interview-in-python">Grokking the Coding Interview Patterns in Python - AI-Powered Course</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e33939b988e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-structures-and-algorithms-dsa/breadth-first-search-e33939b988e9">Breadth First Search</a> was originally published in <a href="https://medium.com/data-structures-and-algorithms-dsa">Data Structures and Algorithms DSA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>