#data-structures — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #data-structures, aggregated by home.social.
-
@alcinnz I've recently learned about the _Tournament Tree_ data structure, which is a form of min (max) heap:
https://www.geeksforgeeks.org/dsa/tournament-tree-and-binary-heap/
It can be used to find the median of sorted arrays or to sort more elements than can fit into memory: for this, multiple sorted arrays are stored at the leafs of the tree while being built bottom-up (k-way merge).
1/2
-
Continuing on my series on fractional indexing, I come to the conclusion that it is a bit of a scam. You have to be very careful with the usage patterns of the indexed list to be sure the index key length does not get out of hand. While a nice concept, it somewhat reminds me of "two digits for the year are enough" or "a 32bit signed integer" is enough to store a time stamp.
More rant details in my blog: https://blog.miamao.de/blog/2026-08/15.Notes_on_Fractional_Indexing.html
-
Meanwhile found the technical term: fractional indexing.
Discussed here: https://observablehq.com/@dgreensp/implementing-fractional-indexing
My (luxury) problem: it is not elegant. It wriggles through a maze of (special) cases.
With arbitrary precision numbers it would be nearly trivial:
1. append to list: last key + 1
2. prepend to list: first key -1
3. insert between a and b: (aKey+bKey)/2Only problem: 3. generates more significant bits than needed.
Hints and boosts appreciated.
-
My #datastructures and #algorithms textbook intro chapter just dropped a bar on me. This textbook came out in 1994 (which is a million years ago) and rings true to today. I think it’s always important to remember that EVERYTHING by and from the computer is a humankind choice. Things are this way because someone made the decision to make that way. None of this is “natural” and we made it and we can change it. Funny thing is I’m reading this all for the sake of learning game dev lol.
-
AI has made Python more important than ever.
But AI doesn't replace algorithms and data structures; understanding them is now even more valuable.
The developers who thrive won't just order up generated code. They'll know what to ask for and why.
@jaywengrow
covers benchmarking, caching, Bloom filters, B-trees, randomization, and more—all in practical Python. -
🚀 Dive into the world of data structures with our latest video, 'Stacks With SplStack.' Perfect for PHP devs looking to up their game! Watch now: https://www.phparch.com/p/2024/01/stacks-with-splstack/ #PHP #DataStructures @scottkeckwarren
-
Google IDX Product Manager Kirupa Chinnathambi writes a code-backed, step-by-step review of Dijkstra's famous graph algorithm, depth, and breadth first search, touching up on Bellman-Ford and A*.
This reminded me of a uni assignment where we recommended shortest path routes to passengers based on geo data from London Tube stations, using A* to compute them.
"Dijkstra's Shortest Path Algorithm"
https://www.kirupa.com/data_structures_algorithms/dijkstra_shortest_path.htm
#algorithms #datastructures #graphs #dfs #bfs #dijkstra #astar #compsci
-
I start my Data Structures and Algorithms course today. A summer course I failed out of when I first tried to get a computer science degree. I’m gonna rock this course 😤. I have been studying on my own and at the very least I’m familiar with all the different #datastructures and #algorithms one would see in this course. I just have to make sure I really get the fundamentals patterns and understanding of them correct this time around
-
A C++ implementation of a fast hash map and hash set using hopscotch hashing
https://github.com/Tessil/hopscotch-map
#HackerNews #C++ #HashMap #HopscotchHashing #DataStructures #Performance
-
> Omg I showed that PR to our writer just last week ... . Even envisioned switching our ink_compiler to see what's what, but figured I'd wait a bit to see if it was merged in the main repo. I couldn't find an update to WritingWithInk but happy to be able to read more in that blogpost! Awesome work.
Apparently my 'stacks in Ink' post has a fan! As an aside, if you've enjoyed or admired something you've read/used/remembered today and you know who created it: let them know! You'd be surprised how little positive feedback even the most 'popular' projects get, and seeing it is a massive mental health boost to whoever created the thing™ you like so much. #MentalHealth #Blog #CreatorAppreciationReminder #Stacks #HmmmmStackedPancakes #DataStructures
-
How GPS actually finds your fastest route. 📍✨
This is Dijkstra’s algorithm in action. It’s the foundational math behind Google Maps, network routing, and gaming AI.
Watch how it uses a priority queue to constantly "relax" the edges, updating the shortest known distance to every node until it locks in the absolute most efficient path to the target.
Pure elegance in 11 lines of code. 💻👇
#dijkstra #computerscience #algorithms #codinglife #datastructures #python
-
One Open-source Project Daily
Algorithms and data structures implemented in JavaScript with explanations and links to further readings
https://github.com/trekhleb/javascript-algorithms
#1ospd #opensource #algorithm #algorithms #computerscience #datastructures #interview #interviewpreparation #javascript #javascriptalgorithms -
🚀 #Redis #8.8 is here, promising new data structures that nobody asked for and performance improvements that everyone will struggle to notice. 🤷♂️ Because clearly, what the world needed was a revolutionary array data structure, not an actual solution to our contextually confused agents. 🙄
https://redis.io/blog/announcing-redis-8-8/ #Release #NewFeatures #PerformanceImprovements #DataStructures #TechNews #HackerNews #ngated -
A new blog post, Arenas, Cyclic Terms, and Flat Equational Systems https://www.philipzucker.com/arena_coegraph2_rational/ #datastructures
-
RE: https://cosocial.ca/@rhempel/116650230030112969
For two decades I've been making that same point (below), also specifically for computational/algorithmic art. It's also been a key topic in many of my past workshops. More than just being about performance, data structure literacy (at least awareness of options) can be a powerful tool/help for expressing and actualizing ideas in the first place, especially for interactive situations (where using the right or wrong or no data structure can be a make-or-break in some situations).
Yet, most of the the time, I felt these efforts to encourage more attention on improving algorithmic literacy in the design/art world have mostly received disinterest or even active pushback (e.g. the classic "to learn how to drive you don't need to know how a combustion engine works" argumentation) etc.
In one of my roles last year, I was responsible for optimizing the performance of several art pieces by well known, celebrated "algorithmic artists" to allow their pieces to run at least with an "alright" frame rate on the company's chosen Android hardware (Snapdragon 8 based). Oftentimes the given code was extremely naive, unoptimized spaghetti and I managed to achieve 2-8x performance boosts. This is not to brag, but to illustrate the wider problem! If one's supposed expertise & claim to fame is "algorithmic art", then one should also strive a little (more) to become proficient in said medium. Good knowledge of data structures and at least a passing interest in performance & hardware are key attention points towards achieving that (in my view)...
The RAM and GPU price explosions will likely "encourage" a little more awareness in the future (not just for arty stuff)... Then again, mass slop coding is a strong counter force/movement... 🤷♂️
Also previously:
https://mastodon.thi.ng/@toxi/116323268206171198
https://mastodon.thi.ng/@toxi/115791275814738584
https://mastodon.thi.ng/@toxi/115791712519666535#DataStructures #Performance #Optimization #AlgorithmicArt #AlgoApril
-
Explore the power of PHP stacks! 🌟 'Stacks With SplStack' is your go-to resource. Watch now: https://www.phparch.com/p/2024/01/stacks-with-splstack/ @scottkeckwarren #PHP #DataStructures
-
I would love to see more technical articles and books written with the same level of clarity.
"Index 1,600,000,000 Keys with Automata and Rust" (2015) by Andrew Gallant.
https://burntsushi.net/transducers/
#article #rustlang #TechnicalWriting #automaton #datastructures #algorithms
-
Learn everything you need to know about Data Structures via these 123 free HackerNoon blog posts. https://hackernoon.com/123-blog-posts-to-learn-about-data-structures #datastructures