contributed by < EricccTaiwan >
開發環境
$ gcc --version
gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ lscpu
Eric Chou changed 17 days agoView mode Like Bookmark
LinkedIn
Array (陣列)
34. Find First and Last Position of Element in Sorted Array
用兩個二分法, 找出左右邊界
時間複雜度: $O(lgN)$
空間複雜度: $O(1)$
int searchlhs(int *nums, int numsSize, int target){
int left=0,right=numsSize-1;
Eric Chou changed 3 months agoView mode Like Bookmark
歐麥-Allmine
R : Interviewer, E : Interviewee
模擬面試錄影: 英 1
模擬面試錄影: 中 2
模擬面試錄影: 中 3
LC 977. Squares of a Sorted Array (Easy)
Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order.
Eric Chou changed 5 months agoEdit mode Like Bookmark
image
For Single Link,
If the single link is in a deep fade, it disrupts communication.
There is No ALTERNATIVE.
If single link is in deepfade, performance is BAD.
image
For Diveristy,
Eric Chou changed a year agoView mode Like Bookmark