欢迎来到软体技术部落格,这里是 React、JavaScript 及技术技能的知识文章页面。无论是在寻找关于monorepo 的技术、zustand 的状态管理技巧,还是希望加强对前端开发的理解,这里都有丰富的资源。每篇文章都精心撰写,旨在提供清晰、易于理解的内容,帮助大家快速找到所需资讯。从基本概念到进阶技巧,无论是初学或是进阶,这里都有适合大家的内容。如果对于图文式内容有兴趣,也可以参考我们 Instagram。
CES 2025:NVIDIA 如何用3 大关键推动AI 技术革新?
AI 的快速崛起正以前所未有的速度改变着我们的世界,而在这个浪潮中,NVIDIA 无疑是举足轻重的推手!在刚结束的CES 2024 中,NVIDIA 的多项发表再次引领了行业方向,无论是硬体性能的突破还是AI 应用的普及,都为AI 技术的未来发展注入了强劲动能。
今天,我们就来聚焦于NVIDIA 在CES 的一些最新发表,以及这些更新如何影响我们的未来!
[Leetcode] 0023. Merge k Sorted Lists
You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.
Merge all the linked-lists into one sorted linked-list and return it.
[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.
[Leetcode] 0253. Meeting Rooms II
Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required.
[Leetcode] 0252. Meeting Rooms
Given an array of meeting time intervals where intervals[i] = [starti, endi], determine if a person could attend all meetings.
Cursor AI:从新手到专业工程师都适用的AI 编辑器,该怎么使用?
写程式的过程,对不同程度的人来说,挑战各有不同,举例来说:
新手可能在语法上卡关,花大量时间找出简单错误,甚至不知道该如何开始。
工程师追求的是高效开发,减少重复性工作,避免琐碎的错误拖慢进度。
产品设计师和产品经理则希望可以快速验证想法,但程式语法对他们来说门槛较高。
传统的程式码编辑器已经有一定的功能,但面对这些问题,仍有许多进步空间。而Cursor 这款结合AI 的程式码编辑器,正是为了解决这些痛点而诞生,让写程式变得更高效、更直觉,也更容易学习。
本篇文章将会介绍Cursor 背后的创办动机、使用方式,并与其他编辑器进行比较,说明它的局限与最佳使用场景,还有未来AI 编辑器的发展趋势,一起看下去吧!
[Leetcode] 0057. Insert Interval
You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti. You are also given an interval newInterval = [start, end] that represents the start and end of another interval.
Insert newInterval into intervals such that intervals is still sorted in ascending order by starti and intervals still does not have any overlapping intervals (merge overlapping intervals if necessary).
Return intervals after the insertion.
Note that you don't need to modify intervals in-place. You can make a new array and return it.
[Leetcode] 0323. Number of Connected Components in an Undirected Graph
You have a graph of n nodes. You are given an integer n and an array edges where edges[i] = [ai, bi] indicates that there is an edge between ai and bi in the graph.
Return the number of connected components in the graph.
[Leetcode] 0261. Graph Valid Tree
You have a graph of n nodes labeled from 0 to n – 1. You are given an integer n and a list of edges where edges[i] = [ai, bi] indicates that there is an undirected edge between nodes ai and bi in the graph.
Return true if the edges of the given graph make up a valid tree, and false otherwise.
[Leetcode] 0269. Alien Dictionary
There is a new alien language that uses the English alphabet. However, the order of the letters is unknown to you.
You are given a list of strings words from the alien language's dictionary. Now it is claimed that the strings in words are sorted lexicographically by the rules of this new language.
If this claim is incorrect, and the given arrangement of string in words cannot correspond to any order of letters, return “”.
Otherwise, return a string of the unique letters in the new alien language sorted in lexicographically increasing order by the new language's rules. If there are multiple solutions, return any of them.
[Leetcode] 0128. Longest Consecutive Sequence
Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.
You must write an algorithm that runs in O(n) time.
[Leetcode] 0305. Number of Islands II
You are given an empty 2D binary grid grid of size mx n. The grid represents a map where 0's represent water and 1's represent land. Initially, all the cells of grid are water cells (ie, all the cells are 0's).
We may perform an add land operation which turns the water at position into a land. You are given an array positions where positions[i] = [ri, ci] is the position (ri, ci) at which we should operate the ith operation .
Return an array of integers answer where answer[i] is the number of islands after turning the cell (ri, ci) into a land.
An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
[Leetcode] 0200. Number Of Islands
Given an mxn 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.
An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
[Leetcode] 0417. Pacific Atlantic Water Flow
There is an mxn rectangular island that borders both the Pacific Ocean and Atlantic Ocean. The Pacific Ocean touches the island's left and top edges, and the Atlantic Ocean touches the island's right and bottom edges.
The island is partitioned into a grid of square cells. You are given an mxn integer matrix heights where heights[r][c] represents the height above sea level of the cell at coordinate (r, c).
The island receives a lot of rain, and the rain water can flow to neighboring cells directly north, south, east, and west if the neighboring cell's height is less than or equal to the current cell's height. Water can flow from any cell adjacent to an ocean into the ocean.
Return a 2D list of grid coordinates result where result[i] = [ri, ci] denotes that rain water can flow from cell (ri, ci) to both the Pacific and Atlantic oceans.
[Leetcode] 0213. House Robber ii
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have a security system connected, and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given an integer array nums representing the amount of money of each house, return the maximum amount of money you can rob tonight without alerting the police.
[LeetCode] 0140. Word Break ii
Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences in any order.
Note that the same word in the dictionary may be reused multiple times in the segmentation.