Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: fix typos in some files#4968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletionsc/0179-largest-number.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,12 +23,12 @@ char * largestNumber(int* nums, int numsSize){
// Sort the array with specified comparaotor.
qsort(nums, numsSize, sizeof(int), compareInt);

//Caculate the length of the return string.
//Calculate the length of the return string.
len = 1;
for (i = 0; i < numsSize; i++) len += snprintf(NULL, 0, "%d", nums[i]);
res = calloc(len, sizeof(char));

// If thefirs element of sorted array is 0,
// If thefirst element of sorted array is 0,
// return a single digit of 0 no matter how long is the string.
if (nums[0] == 0) {
res[0] = '0';
Expand Down
2 changes: 1 addition & 1 deletioncpp/0155-min-stack.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
/*
Design stack that supports push, pop, top, &retriving min element
Design stack that supports push, pop, top, &retrieving min element

2 stacks, 1 normal & 1 monotonic decr, only push if lower than top

Expand Down
2 changes: 1 addition & 1 deletioncpp/0278-first-bad-version.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@
call isBadVersion(4) -> true

1.- Find the number in the middle of the vector.
2.- Takes a part (first or second), depending on whether or not the target is greater than themiddel.
2.- Takes a part (first or second), depending on whether or not the target is greater than themiddle.
3.- Change the current left or right part.
3.- Do this process until the left reaches the right.

Expand Down
2 changes: 1 addition & 1 deletioncpp/1921-eliminate-maximum-number-of-monsters.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,7 @@
Explanation:
In the beginning, the distances of the monsters are [1,3,4]. You eliminate the first monster.
After a minute, the distances of the monsters are [X,2,3]. You eliminate the second monster.
After a minute, the distances of the monsters are [X,X,2]. You eliminate thethrid monster.
After a minute, the distances of the monsters are [X,X,2]. You eliminate thethird monster.
All 3 monsters can be eliminated.

Time : O(N)
Expand Down
2 changes: 1 addition & 1 deletionjavascript/1882-process-tasks-using-servers.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,7 +33,7 @@ var assignTasks = function (servers, tasks) {
for (let i = 0; i < tasks.length; i++) {
sec = Math.max(i, sec);

// if the we don't have server available then jump to the nextimidiate
// if the we don't have server available then jump to the nextimmediate
// time when the server will be available.
if (freeServers.isEmpty()) {
sec = toBeCompleted.front()[0];
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp