发布于 2026-01-06 6 阅读
0

数组、哈希表、链表、队列、栈和树(我在 repl.it 上搭建的用于学习 FAANG 的项目)DEV 的全球展示挑战赛,由 Mux 呈现:展示你的项目!

数组、哈希表、链表、队列、栈和树(我在 repl.it 上搭建的用于学习 FAANG 的实验环境)

由 Mux 主办的 DEV 全球展示挑战赛:展示你的项目!

Twitter关注

你知道我有电子报吗?📬

如果您想在我发布新博客文章或
重大项目公告时收到通知,请访问
https://cleancodestudio.paperform.co/


注意:这个 repl.it 项目是我备战 FAANG 面试时的一个练习环境/试验场——并非所有数据结构和/或算法都能保证正常运行。这个 repl.it 项目就像我的个人笔记/日志——未经专业支持或测试。我的实现可能存在错误,某些部分可能无法完全协同工作。 如果您想了解我练习仓库中某些数据结构的可靠性,欢迎在下方留言。
Repl.it 文件夹结构


这是上面链接的 repl.it 中显示的index.js页面。取消注释将文件加载到你想要修改的数据结构中的 require 语句,然后点击播放/运行按钮重新执行代码。

/**----------------------------------------------
 | Arrays
 *-----------------------------------------------
 |
 |   . Pros
 |     - Ordered
 |     - Fast lookups
 |     - Fast push & pop
 |
 |   . Cons
 |     - Slow iserts
 |     - Slow deletes
 |     - Fixed size (when using static arrays)
 |
 |   . Operations
 |     - append O(1)*
 |       -> may be O(n) 
 |       -> if allocated memory block needs more space
 |     - lookup O(1)
 |     - insert O(n)
 |     - delete O(n)
 |
 */

// require('./arrays/introduction.js')
// require('./arrays/static-vs-dynamic.js')
// require('./arrays/implementation.js')
// require('./arrays/strings-and-arrays.js')
// require('./arrays/merge-sorted-arrays.js')


/**----------------------------------------------
 | Hash Tables
 *-----------------------------------------------
 |
 |   . Pros
 |     - Fast lookups*
 |     - Fast inserts
 |     - Flexible keys
 |
 |   . Cons
 |     - Unordered
 |     - Slow key iteration
 |
 |   . Operations
 |     - insert O(1)
 |     - lookup O(1)
 |     - delete O(1)
 |     - search O(1)
 |
 */


// require('./hash-tables/introduction.js')
// require('./hash-tables/collisions.js')
// require('./hash-tables/implementation.js')
// require('./hash-tables/first-recurring-character.js')


/**----------------------------------------------
 | Linked List
 *-----------------------------------------------
 |
 |   . Pros
 |     - Ordered
 |     - Flexible size
 |     - Fast deletion
 |     - Fast insertion
 |
 |   . Cons
 |     - Slow lookup
 |     - More memory
 |
 |   . Operations
 |     - prepend O(1)
 |     - append O(1)
 |     - lookup O(n)
 |     - insert O(n)
 |     - delete O(n)
 |
 */

// require('./linked-lists/introduction.js')
// require('./linked-lists/pointer.js')
// require('./linked-lists/implementation.js')
// require('./linked-lists/reverse.js')


// require('./stacks/introduction.js')
// require('./stacks/implementation.js')

// require('./queues/introduction.js')
// require('./queues/implementation.js')
// require('./queues/queues-using-stacks.js')



/**----------------------------------------------
 | Trees
 *-----------------------------------------------
 |
 |
 */
// require('./trees/introduction.js')
// require('./trees/implementation.js')
// require('./trees/binary-search-tree-implementation.js')
require('./linked-lists/implementation.js')
Enter fullscreen mode Exit fullscreen mode

我所有的数据结构和算法笔记,专为FAANG面试准备而整理。

代码整洁之道、
代码整洁工作室
、代码重构、
计算机科学、算法
、数据结构 - JavaScript
设计原则


你知道我有电子报吗?📬


如果你想在我发布新博客文章或重大项目公告时收到通知,请直接向下滚动并进行
设置!

文章来源:https://dev.to/cleancodestudio/arrays-hash-tables-linked-lists-queues-stacks-trees-my-repl-it-playground-while-stuying-for-faang-26i2