šŸŽ’
Technical Interview Study Guide
  • šŸ•Welcome!
  • šŸ„Getting Started
    • Study Plan
    • Optimizing Revision
    • Summer 2024 Timeline
    • FAQs
  • 🄨Algorithms
    • Binary Search
    • Sorting
    • Recursion
    • Graph
    • Quick Select
    • Intervals
    • Binary
    • Geometry
    • Dynamic Programming
  • šŸ„žData Structures
    • Arrays
      • Matrices
    • Strings
    • Linked Lists
      • Doubly Linked Lists
    • Hash Tables
    • Graphs
      • Trees
        • Binary Search Trees
        • Heaps
        • Tries
        • Segment Trees
    • Stacks
    • Queues
      • Double Ended Queues
    • Union-Find Disjoint Set (UFDS)
  • šŸ”Problems Guide
    • Dynamic Programming Roadmap
      • Warmup
        • Climbing Stairs
        • Nth Tribonacci Number
        • Perfect Squares
      • Linear Sequence
        • Min Cost to Climb Stairs
        • Minimum Time to Make Rope Colorful
        • House Robber
        • Decode Ways
        • Minimum Cost for Tickets
        • Solving Questions with Brainpower
  • šŸ£Other Technical Topics
    • General Problem Solving
    • Runtime Predictions
    • System Design
      • SQL
      • Accessing APIs
    • Operating Systems
  • šŸæNon-technical Topics
    • Behavioral Interviews
    • Resumes
Powered by GitBook
On this page
  1. Other Technical Topics

General Problem Solving

Consolidating some of the common patterns and problem solving methods you can try when working on problems

PreviousSolving Questions with BrainpowerNextRuntime Predictions

Last updated 1 year ago

This list is not exhaustive! If you wish to contribute more techniques, please email me at

  1. Finding the median of data: focus on the definition of a median and model the solution after it

  2. Sub-array problems: think about using sliding windows discussed under Arrays

  3. Sub-sequence problems: think about sorting (if possible)

  4. O(nlog⁔n)O(n \log n)O(nlogn) upper bound (found using Runtime Predictions)

    1. Divide and conquer, similar to merge sort

    2. Arrays manipulation + Binary Search such as prefix sums + binary search

    3. Sorting + operations on sorted array

    4. Segment Trees+ iterating over all ranges

    5. Applying the sweep line algorithm if there are Intervals + events

  5. Minimum/maximum across queries: try using Heaps or Double Ended Queues

    1. Heaps can be used to track the minimum during any query

    2. Double Ended Queues can be used to represent the current maximum (as the front) and potential maximums (subsequent elements) in the event where the current maximum "expires"

šŸ£
woojiahao1234@gmail.com