Best of AlgorithmsJuly 2024

  1. 1
    Article
    Avatar of devtoDEV·2y

    GitHub Repositories Every Software Engineer Should Know

    The post provides a curated list of GitHub repositories valuable for software engineers at any stage of their career. Categories include RoadMaps, Books, Blogs, and Websites, Algorithms, Design Patterns, System Design, Design Resources, Projects, Tutorials, and APIs. Each category offers specific repositories that serve as educational materials and practical resources to improve various aspects of software development skills.

  2. 2
    Article
    Avatar of javarevisitedJavarevisited·2y

    How to Prepare for Coding Interviews in 2024? (with Resources)

    In today's competitive job market, preparing for coding interviews requires a systematic approach. Key areas to focus on include Data Structures and Algorithms, High-Level Design (HLD), Low-Level Design (LLD), CS Fundamentals, and Behavioral questions. Utilize resources such as DesignGuru.io, notable books, video channels, and platforms like Leetcode, Codemia, and Pramp for comprehensive preparation. Mock interviews and company-specific preparation are also essential for success.

  3. 3
    Article
    Avatar of substackSubstack·2y

    20 Patterns to Master Dynamic Programming

    Dynamic Programming (DP) is known as a challenging topic for coding interviews. Learning DP efficiently involves understanding various patterns that solve a wide range of problems. This guide covers 20 DP patterns, from easy to hard, offering insights into their uses and linking to LeetCode problems for practice. Patterns include Fibonacci Sequence, Kadane's Algorithm for maximum subarray problems, the 0/1 and Unbounded Knapsack problems, Longest Common Subsequence, and many others.

  4. 4
    Article
    Avatar of substackSubstack·2y

    Rate Limiting Algorithms Explained with Code

    Rate limiting is crucial for preventing your service from being overwhelmed by too many requests from single users or bots, which can degrade the experience for others. This post explains 5 common rate limiting algorithms: Token Bucket, Leaky Bucket, Fixed Window Counter, Sliding Window Log, and Sliding Window Counter. Each algorithm has its own set of pros and cons and is suited for different scenarios. Implementing these algorithms can help maintain a smooth and controlled flow of requests, ensuring stability and performance of your service.

  5. 5
    Article
    Avatar of kdnuggetsKDnuggets·2y

    Learn Computer Science with Princeton University for FREE!

    Princeton University offers a range of free computer science courses suitable for beginners to advanced learners. These include foundational programming with Java, algorithms, theoretical computation, and computer architecture. The courses are designed with flexible schedules and cover essential skills needed to start a career in tech.

  6. 6
    Article
    Avatar of communityCommunity Picks·2y

    Heaps in JavaScript

    Heaps, also known as priority queues, are a type of tree data structure where every node satisfies the heap property, either as a max-heap or min-heap. Heaps are complete binary trees and can be efficiently represented using arrays. Key operations include adding and removing elements while maintaining the heap property. The time complexity for these operations is O(log(n)), while heapify has an asymptotic complexity of O(n). Converting a min-heap to a max-heap can be done by inserting negated keys.

  7. 7
    Article
    Avatar of javarevisitedJavarevisited·2y

    Top 5 Courses to Crack FAANG or MAANG Interviews in 2024

    Landing a job at MAANG (Meta, Amazon, Apple, Netflix, Google) or FAANG (Facebook, Amazon, Apple, Netflix, Google) is challenging due to high competition, rigorous technical interviews, and high standards. Success requires thorough preparation in key areas like data structures, algorithms, system design, and behavioral assessments. The post recommends top courses such as Andrei Neagoie's 'Master the Coding Interview', Design Gurus' 'Grokking the System Design Interview', and Jose Portilla's 'The Complete SQL Bootcamp' to aid in this preparation.

  8. 8
    Article
    Avatar of communityCommunity Picks·2y

    Applying tree traversal algorithms to DOM

    Learn how to apply tree traversal algorithms, specifically pre-order traversal, to navigate the Document Object Model (DOM). The post illustrates how to create functions like locateById and locateAllByClassName without using built-in APIs, and explores memoization for optimizing repeated queries. It also delves into implementing custom querySelector and querySelectorAll functions and demonstrates how to clone a DOM tree using recursive traversal.

  9. 9
    Article
    Avatar of substackSubstack·2y

    LeetCode was HARD until I Learned these 15 Patterns

    Mastering LeetCode involves understanding key problem-solving patterns rather than sheer volume of problems solved. This post outlines 15 crucial patterns, including Prefix Sum, Two Pointers, Sliding Window, Monotonic Stack, and more. Each pattern is explained with sample problems and solutions to help identify and apply the right approach efficiently.

  10. 10
    Article
    Avatar of equinixEquinix·2y

    Comparing Load Balancing Algorithms

    Load balancers are essential for efficiently routing traffic in various applications, whether on-premises or in the cloud. The post compares six widely used load balancing algorithms, both static and dynamic, and evaluates them based on factors like distribution methodology, performance, scalability, complexity, and fault tolerance. Static algorithms like round robin and weighted round robin are simpler but less flexible, while dynamic algorithms like least connections and least response time adapt to changing server conditions. The IP hash algorithm is noted for session persistence, and the resource-based algorithm maximizes resource utilization. Equinix's Load Balancer-as-a-Service is highlighted as an optimal solution for global traffic management.

  11. 11
    Article
    Avatar of communityCommunity Picks·2y

    Trie in Javascript: the Data Structure behind Autocomplete

    Trie, also known as a prefix tree, is a data structure where each node represents a character of a word. It's efficient for storing words and supports quick insertion and search operations. This post explains how to implement a Trie in JavaScript, covers basic operations like insertion and search, and discusses its applications such as autocomplete, spell checker, and IP routing. The space and time complexities of Trie operations are also explored.

  12. 12
    Article
    Avatar of hnHacker News·2y

    How to implement a hash table (in C)

    Learn how to implement a simple hash table data structure in C. The post covers linear and binary search methods, the principles of hash tables, hash functions, collision handling through linear probing, and resizing the table when it's too full. Implementation details include creating, inserting, and retrieving items from the hash table, along with a demo program and discussion on potential improvements and performance comparisons.