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

solved question 88 in leetcode in c#1491

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

Open
2025mcb1455-spec wants to merge1 commit intoTheAlgorithms:master
base:master
Choose a base branch
Loading
from2025mcb1455-spec:leet
Open
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
88
  • Loading branch information
@2025mcb1455-spec
2025mcb1455-spec committedOct 2, 2025
commit8b535f8f9c9b3cf7ea252c32471bb24d00ccfc50
23 changes: 23 additions & 0 deletionsleetcode/src/88.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
void merge(int* nums1, int nums1Size, int m, int* nums2, int nums2Size, int n)
{
int j = 0;
int temp;

for (int i = m; i < nums1Size; i++)
{
nums1[i] = nums2[j];
j++;
}
for (int i = 0; i < nums1Size - 1; i++)
{
for (int j = 0; j < nums1Size - i - 1; j++)
{
if (nums1[j] > nums1[j + 1])
{
temp = nums1[j];
nums1[j] = nums1[j + 1];
nums1[j + 1] = temp;
}
}
}
}

[8]ページ先頭

©2009-2025 Movatter.jp