大貓的第一個家

歡迎來到我的部落格,這裡有我分享的技術筆記、生活點滴和旅遊見聞。

  • 在 Next.js 中串接 Google Maps API

    在現代 Web 開發中,地圖服務是許多應用的重要元件。本文將介紹如何在 Next.js 中使用 Google Maps API,並展示一個包含地圖標記和互動功能的範例。

  • Next.js 15 (App Router) - Rendering

    Next.js 從 Pages Router 轉換到 App Router 後,資料獲取和渲染策略有了重大改變。本文將詳細解說如何將 Next.js 12 的 CSR、SSG、ISR 和 SSR 模式轉換到 App Router 架構中。

  • [Data Structures] Hash Tables

    In this article, we’ll explore the hash table data structure, which provides fast data access using keys. We'll build our own hash table step-by-step in JavaScript, covering how it stores data, handles collisions, and retrieves values.

  • [Data Structures] Binary Search Trees

    In this article, we'll dive into the fundamentals of Binary Search Trees (BST), a powerful data structure that organizes data for efficient insertion, search, and traversal operations. Starting from the basic concepts, we’ll explore the recursive call stack, how to insert and search for values, and cover multiple traversal methods, including depth-first (in-order, pre-order, post-order) and breadth-first traversals. By the end, you’ll understand BST operations and have the code to create and manipulate a Binary Search Tree in JavaScript.

  • [Data Structures] Linked Lists

    Linked lists are a fundamental data structure in computer science, offering flexibility in managing and organizing data. This article introduces linked lists in JavaScript, explaining their structure, basic operations like adding and removing nodes, and how to search within them. Perfect for beginners, this guide takes you step-by-step through building and understanding linked lists, making complex concepts accessible to everyone.

  • [Algorithms] Max Stock Profit

    In this article, we’ll walk through the Max Stock Profit algorithm, which helps determine the maximum profit achievable from buying and selling a stock in a single day based on its changing prices. This common algorithm problem often appears in technical interviews and requires a mix of array handling and optimization techniques.

  • [Algorithms] Merge Sort

    In this article, we’re covering Merge Sort, an efficient sorting algorithm that breaks down arrays into smaller parts, sorts them, and merges them back into a single sorted array. Merge Sort is often highlighted in technical interviews, so understanding its mechanics is essential.