Skip to content
DevMeme
6956 of 7435
RAM Prices Make DFS Superior to BFS: The Peter Thiel Realization
CS Fundamentals Post #7622, on Jan 14, 2026 in TG

RAM Prices Make DFS Superior to BFS: The Peter Thiel Realization

Description

A meme featuring a close-up photo of Peter Thiel with a serious, contemplative expression against a blue wave/water background. The top text reads: 'Due to RAM shortage & price hike DFS is superior than BFS now'. The joke references the fundamental difference between Depth-First Search (DFS) and Breadth-First Search (BFS) graph traversal algorithms: DFS uses O(h) stack memory (height of tree) while BFS uses O(w) queue memory (width of tree/level). With RAM becoming expensive, the memory-efficient DFS becomes the economically superior choice. Peter Thiel's investor persona makes him the perfect face for framing an algorithm choice as a financial decision

Comments

6
Anonymous ★ Top Pick When your RAM is so expensive that even your algorithm selection needs CFO approval
  1. Anonymous ★ Top Pick

    When your RAM is so expensive that even your algorithm selection needs CFO approval

  2. @kbulygin 5mo

    The universe is just trying to bring humanity back to real AI.

  3. @HeTema 5mo

    Explain it to me please i did not get it :(

    1. @dollarbr 5mo

      The meme is about how two different algorithms use RAM. BFS (Breadth-First Search): Think of it like exploring a maze by trying every path simultaneously. It finds the shortest exit quickly, but it’s a RAM hog because it has to remember every single path at once. DFS (Depth-First Search): It explores one path until it hits a wall, then goes back. It’s much more memory-efficient because it only remembers the current path. (if I'm not wrong) Since RAM is currently expensive, the joke says DFS is "superior" simply because it saves you money on hardware, even if it's not always the fastest. Some real-world uses (beyond mazes) BFS (Focus on Proximity): Social Media: Finding "Friends of Friends" or 2nd-degree connections. GPS/Maps: Finding the shortest route between two points. Peer-to-Peer Networks: Finding the closest user to download a file. DFS (Focus on Structure): Game AI (Chess): Simulating a move all the way to the end of the game to see if it leads to a win. File Systems: Searching for a file deep inside nested folders. Logic Checking: Used by compilers to make sure your code doesn't have infinite loops. I only know this because I was learning about a puzzle game I really like and was trying to create a "infinite replayability" version of it for my phone, the puzzle is called klotski if you want to check it

      1. dev_meme 5mo

        People like you, genuinly replying to a question, and not even using AI, is a jewel of IT community and followers of this channel 😍

        1. @dollarbr 5mo

          lol, thanks, I used some ai while making the klotski project to understand some stuff about using DFS to check for solutions, but yeah, the answer above is what I understood about the topic after working on stuff that uses it

Use J and K for navigation