Souvik Mukherjeesouvik150.hashnode.dev·May 29, 2024Algorithms of building a Proximity Service to Discover Nearby GemsIn Part 1 of our series, "Building a Proximity Service to Discover Nearby Gems," we laid the groundwork by defining the functional and non-functional requirements, performing back-of-the-envelope estimations, and proposing a high-level design. Now, i...30 readsBuilding a Proximity Service to Discover Nearby Gemsgoogle s2
Erioifpuderio.hashnode.dev·May 8, 2024使用四叉树优化碰撞检查前情提要 大概是初中吧,我当时在给游戏开发模组,做了个界面,界面中面板之间要求不能堆叠,因为堆叠后不好处理点击事件等,我当时是通过遍历所有的面板去判断的,后来才知道可以用四叉树优化类似的需求。 还是得说一句,四叉树确实能优化这个需求,但提升不一定会明显,毕竟四叉树的时间复杂度是 logN,和 N 相比,只有在数据量大的时候才会有明显效果。 四叉树 那么四叉树是怎么提升效率的呢?先看一下原本的实现: function intersects (range, cur) { return !( ...React
Syed Quasimitsmequasim.hashnode.dev·Sep 17, 2023Quadtree: The Secret to Smooth Map ZoomingMy journey into map development began with the goal of implementing Mapbox into my Android project. Along the way, I discovered a game-changer: the Quadtree data structure. Although I hadn't directly applied Quadtree to my map development project, th...10 likesmapbox