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

Commit45df20c

Browse files
Add C++ implementation
Signed-off-by: begeekmyfriend <begeekmyfriend@gmail.com>
1 parentecaf278 commit45df20c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎0001_two_sum/two_sum.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include<stdio.h>
22
#include<stdlib.h>
33

4+
45
structobject {
56
intval;
67
intindex;
@@ -11,7 +12,7 @@ static int compare(const void *a, const void *b)
1112
return ((structobject*)a)->val- ((structobject*)b)->val;
1213
}
1314

14-
staticint*twosum(int*nums,intnumsSize,inttarget,int*returnSize)
15+
int*twosum(int*nums,intnumsSize,inttarget,int*returnSize)
1516
{
1617
inti,j;
1718
structobject*objs=malloc(numsSize*sizeof(*objs));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp