軟體技術部落格

歡迎來到軟體技術部落格,這裡是 React、JavaScript 及技術技能的知識文章頁面。無論是在尋找關於monorepo 的技術、zustand 的狀態管理技巧,還是希望加強對前端開發的理解,這裡都有豐富的資源。每篇文章都精心撰寫,旨在提供清晰、易於理解的內容,幫助大家快速找到所需資訊。從基本概念到進階技巧,無論是初學或是進階,這裡都有適合大家的內容。如果對於圖文式內容有興趣,也可以參考我們 Instagram

[Leetcode] 0020. Valid Parentheses

Given a string s containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[‘ and ‘]’, determine if the input string is valid.

An input string is valid if:

Open brackets must be closed by the same type of brackets.
Open brackets must be closed in the correct order.
Every close bracket has a corresponding open bracket of the same type.

閱讀更多 »

[Leetcode] 0049. Group Anagrams

Given an array of strings strs, group the anagrams together. You can return the answer in any order.

An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.

閱讀更多 »

[Leetcode] 0242. Valid Anagram

Given two strings s and t, return true if t is an anagram of s, and false otherwise.

An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.

閱讀更多 »

[Leetcode] 0076. Minimum Window Substring

Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string “”.

The testcases will be generated such that the answer is unique.

閱讀更多 »

[Leetcode] 0424. Longest Repeating Character Replacement

You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times.

Return the length of the longest substring containing the same letter you can get after performing the above operations.

閱讀更多 »

[Leetcode] 0212. Word Search II

Given an m x n board of characters and a list of strings words, return all words on the board.

Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word.

閱讀更多 »

[Leetcode] 0079. Word Search

Given an m x n grid of characters board and a string word, return true if word exists in the grid.

The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.

閱讀更多 »

[Leetcode] 0048. Rotate Image

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).

You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.

閱讀更多 »

[Leetcode] 0885. Spiral Matrix III

You start at the cell (rStart, cStart) of an rows x cols grid facing east. The northwest corner is at the first row and column in the grid, and the southeast corner is at the last row and column.

You will walk in a clockwise spiral shape to visit every position in this grid. Whenever you move outside the grid’s boundary, we continue our walk outside the grid (but may return to the grid boundary later.). Eventually, we reach all rows * cols spaces of the grid.

Return an array of coordinates representing the positions of the grid in the order you visited them.

閱讀更多 »

[Leetcode] 0143. Reorder List

You are given the head of a singly linked-list. The list can be represented as:

L0 → L1 → … → Ln – 1 → Ln
Reorder the list to be on the following form:

L0 → Ln → L1 → Ln – 1 → L2 → Ln – 2 → …
You may not modify the values in the list’s nodes. Only nodes themselves may be changed.

閱讀更多 »

CES 2025:NVIDIA 如何用 3 大關鍵推動 AI 技術革新?

AI 的快速崛起正以前所未有的速度改變著我們的世界,而在這個浪潮中,NVIDIA 無疑是舉足輕重的推手!在剛結束的 CES 2024 中,NVIDIA 的多項發表再次引領了行業方向,無論是硬體性能的突破還是 AI 應用的普及,都為 AI 技術的未來發展注入了強勁動能。
今天,我們就來聚焦於 NVIDIA 在 CES 的一些最新發表,以及這些更新如何影響我們的未來!

閱讀更多 »

[Leetcode] 0021. Merge Two Sorted Lists

You are given the heads of two sorted linked lists list1 and list2.

Merge the two lists in a one sorted list. The list should be made by splicing together the nodes of the first two lists.

Return the head of the merged linked list.

閱讀更多 »

[Leetcode] 2402. Meeting Rooms III

ou are given an integer n. There are n rooms numbered from 0 to n – 1.

You are given a 2D integer array meetings where meetings[i] = [starti, endi] means that a meeting will be held during the half-closed time interval [starti, endi). All the values of starti are unique.

Meetings are allocated to rooms in the following manner:

Each meeting will take place in the unused room with the lowest number.
If there are no available rooms, the meeting will be delayed until a room becomes free. The delayed meeting should have the same duration as the original meeting.
When a room becomes unused, meetings that have an earlier original start time should be given the room.
Return the number of the room that held the most meetings. If there are multiple rooms, return the room with the lowest number.

A half-closed interval [a, b) is the interval between a and b including a and not including b.

閱讀更多 »
zh_TW繁體中文