[Leetcode] 0435. Non-overlapping Intervals
Explore diverse LeetCode solutions in Python, C++, Java […]
[Leetcode] 0435. Non-overlapping Intervals Read More »
Leetcode, 技術文章Explore diverse LeetCode solutions in Python, C++, Java […]
[Leetcode] 0435. Non-overlapping Intervals Read More »
Leetcode, 技術文章寫程式的過程,對不同程度的人來說,挑戰各有不同,舉例來說:
新手 可能在語法上卡關,花大量時間找出簡單錯誤,甚至不知道該如何開始。
工程師 追求的是高效開發,減少重複性工作,避免瑣碎的錯誤拖慢進度。
產品設計師 和 產品經理 則希望可以快速驗證想法,但程式語法對他們來說門檻較高。
傳統的程式碼編輯器已經有一定的功能,但面對這些問題,仍有許多進步空間。而 Cursor 這款結合 AI 的程式碼編輯器,正是為了解決這些痛點而誕生,讓寫程式變得更高效、更直覺,也更容易學習。
本篇文章將會介紹 Cursor 背後的創辦動機、使用方式,並與其他編輯器進行比較,說明它的侷限與最佳使用場景,還有未來 AI 編輯器的發展趨勢,一起看下去吧!
Cursor AI:從新手到專業工程師都適用的 AI 編輯器,該怎麼使用? Read More »
軟體工程師Explore diverse LeetCode solutions in Python, C++, Java
[Leetcode] 0056. Merge Intervals Read More »
Leetcode, 技術文章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] 0057. Insert Interval Read More »
Leetcode, 技術文章Explore diverse LeetCode solutions in Python, C++, Java
[Leetcode] 0019. Remove Nth Node From End of List Read More »
Leetcode, 技術文章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] 0323. Number of Connected Components in an Undirected Graph Read More »
Leetcode, 技術文章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] 0261. Graph Valid Tree Read More »
Leetcode, 技術文章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] 0269. Alien Dictionary Read More »
Leetcode, 技術文章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] 0128. Longest Consecutive Sequence Read More »
Leetcode, 技術文章You are given an empty 2D binary grid grid of size m x 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 (i.e., 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] 0305. Number of Islands II Read More »
Leetcode, 技術文章