id int64 0 14.1k | problem_id int64 1 1.31k | problem_title stringclasses 441
values | difficulty stringclasses 3
values | c_source stringclasses 441
values | architecture stringclasses 4
values | optimization stringclasses 4
values | compiler stringclasses 8
values | assembly stringlengths 31 174k |
|---|---|---|---|---|---|---|---|---|
0 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O0 | ARM64 gcc 15.2.0 | cmp:
sub sp, sp, #16
str x0, [sp, 8]
str x1, [sp]
ldr x0, [sp, 8]
ldr w1, [x0]
ldr x0, [sp]
ldr w0, [x0]
sub w0, w1, w0
add sp, sp, 16
ret
twoSum:
stp x29, x30, [sp, -64]!
mov x29,... |
1 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O1 | ARM64 gcc 15.2.0 | cmp:
ldr w2, [x0]
ldr w0, [x1]
sub w0, w2, w0
ret
twoSum:
stp x29, x30, [sp, -48]!
mov x29, sp
stp x19, x20, [sp, 16]
stp x21, x22, [sp, 32]
mov x22, x0
mov w20, w1
mov w21, w2
add ... |
2 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O2 | ARM64 gcc 15.2.0 | cmp:
ldr w2, [x0]
ldr w0, [x1]
sub w0, w2, w0
ret
twoSum:
stp x29, x30, [sp, -48]!
mov x29, sp
stp x21, x22, [sp, 32]
mov x22, x0
add w0, w1, 1
stp x19, x20, [sp, 16]
mov w20, w1
mov ... |
3 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O3 | ARM64 gcc 15.2.0 | cmp:
ldr w2, [x0]
ldr w0, [x1]
sub w0, w2, w0
ret
twoSum:
stp x29, x30, [sp, -64]!
mov x29, sp
str x23, [sp, 48]
mov x23, x0
add w0, w1, 1
stp x21, x22, [sp, 32]
mov w22, w1
mov w2... |
4 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O0 | armv8-a clang 21.1.0 | cmp:
sub sp, sp, #16
str x0, [sp, #8]
str x1, [sp]
ldr x8, [sp, #8]
ldr w8, [x8]
ldr x9, [sp]
ldr w9, [x9]
subs w0, w8, w9
add sp, sp, #16
ret
twoSum:
sub sp, sp, #80
stp x29, x30,... |
5 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O1 | armv8-a clang 21.1.0 | cmp:
ldr w8, [x0]
ldr w9, [x1]
sub w0, w8, w9
ret
twoSum:
stp x29, x30, [sp, #-48]!
stp x22, x21, [sp, #16]
stp x20, x19, [sp, #32]
mov x29, sp
mov w8, w1
mov x22, x0
mov w20, w2
sbfi... |
6 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O2 | armv8-a clang 21.1.0 | cmp:
ldr w8, [x0]
ldr w9, [x1]
sub w0, w8, w9
ret
.LCPI1_0:
.word 0
.word 1
.word 2
.word 3
twoSum:
stp x29, x30, [sp, #-48]!
stp x22, x21, [sp, #16]
stp x20, x19, [sp, #32]
mov x29, sp
... |
7 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | aarch64 | -O3 | armv8-a clang 21.1.0 | cmp:
ldr w8, [x0]
ldr w9, [x1]
sub w0, w8, w9
ret
.LCPI1_0:
.word 0
.word 1
.word 2
.word 3
twoSum:
stp x29, x30, [sp, #-48]!
stp x22, x21, [sp, #16]
stp x20, x19, [sp, #32]
mov x29, sp
... |
8 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O0 | mips64 clang 21.1.0 | cmp:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -32
sd $ra, 24($sp)
sd $fp, 16($sp)
move $fp, $sp
sd $4, 8($fp)
sd $5, 0($fp)
ld $1, 8($fp)
lw $1, 0($1)
ld $2, 0($fp)
lw $2, 0($2)
subu $1,... |
9 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O1 | mips64 clang 21.1.0 | cmp:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
lw $1, 0($5)
lw $2, 0($4)
subu $2, $2, $1
move $sp, $fp
ld $fp, 0($sp)
ld $ra, 8($sp)
jr $ra
... |
10 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O2 | mips64 clang 21.1.0 | cmp:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
lw $1, 0($5)
lw $2, 0($4)
subu $2, $2, $1
move $sp, $fp
ld $fp, 0($sp)
ld $ra, 8($sp)
jr $ra
... |
11 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O3 | mips64 clang 21.1.0 | cmp:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -16
sd $ra, 8($sp)
sd $fp, 0($sp)
move $fp, $sp
lw $1, 0($5)
lw $2, 0($4)
subu $2, $2, $1
move $sp, $fp
ld $fp, 0($sp)
ld $ra, 8($sp)
jr $ra
... |
12 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O0 | mips64 gcc 15.2.0 | cmp:
daddiu $sp,$sp,-32
sd $fp,24($sp)
move $fp,$sp
sd $4,0($fp)
sd $5,8($fp)
ld $2,0($fp)
lw $3,0($2)
ld $2,8($fp)
lw $2,0($2)
subu $2,$3,$2
move $sp,$fp
ld $fp,24($sp)
... |
13 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O1 | mips64 gcc 15.2.0 | cmp:
lw $3,0($4)
lw $2,0($5)
jr $31
subu $2,$3,$2
twoSum:
daddiu $sp,$sp,-64
sd $31,56($sp)
sd $28,48($sp)
sd $20,40($sp)
sd $19,32($sp)
sd $18,24($sp)
sd $17,16($sp)
sd ... |
14 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O2 | mips64 gcc 15.2.0 | cmp:
lw $3,0($4)
lw $2,0($5)
jr $31
subu $2,$3,$2
twoSum:
daddiu $sp,$sp,-80
sd $28,64($sp)
lui $28,%hi(%neg(%gp_rel(twoSum)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(twoSum)))
ld $25,%call16(m... |
15 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | mips64 | -O3 | mips64 gcc 15.2.0 | cmp:
lw $3,0($4)
lw $2,0($5)
jr $31
subu $2,$3,$2
twoSum:
daddiu $sp,$sp,-80
sd $28,64($sp)
lui $28,%hi(%neg(%gp_rel(twoSum)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(twoSum)))
ld $25,%call16(m... |
16 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O0 | RISC-V 64 clang 21.1.0 | cmp:
addi sp, sp, -32
sd ra, 24(sp)
sd s0, 16(sp)
addi s0, sp, 32
sd a0, -24(s0)
sd a1, -32(s0)
ld a0, -24(s0)
lw a0, 0(a0)
ld a1, -32(s0)
lw a1, 0(a1)
subw a0, a0, a1
ld ... |
17 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O1 | RISC-V 64 clang 21.1.0 | cmp:
lw a0, 0(a0)
lw a1, 0(a1)
subw a0, a0, a1
ret
twoSum:
addi sp, sp, -48
sd ra, 40(sp)
sd s0, 32(sp)
sd s1, 24(sp)
sd s2, 16(sp)
sd s3, 8(sp)
sd s4, 0(sp)
mv s3, a2
... |
18 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O2 | RISC-V 64 clang 21.1.0 | cmp:
lw a0, 0(a0)
lw a1, 0(a1)
subw a0, a0, a1
ret
twoSum:
addi sp, sp, -64
sd ra, 56(sp)
sd s0, 48(sp)
sd s1, 40(sp)
sd s2, 32(sp)
sd s3, 24(sp)
sd s4, 16(sp)
sd s5, 8(sp)... |
19 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O3 | RISC-V 64 clang 21.1.0 | cmp:
lw a0, 0(a0)
lw a1, 0(a1)
subw a0, a0, a1
ret
twoSum:
addi sp, sp, -64
sd ra, 56(sp)
sd s0, 48(sp)
sd s1, 40(sp)
sd s2, 32(sp)
sd s3, 24(sp)
sd s4, 16(sp)
sd s5, 8(sp)... |
20 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O0 | RISC-V 64 gcc 15.2.0 | cmp:
addi sp,sp,-32
sd ra,24(sp)
sd s0,16(sp)
addi s0,sp,32
sd a0,-24(s0)
sd a1,-32(s0)
ld a5,-24(s0)
lw a4,0(a5)
ld a5,-32(s0)
lw a5,0(a5)
subw a5,a4,a5
sext.w a5,a5
... |
21 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O1 | RISC-V 64 gcc 15.2.0 | cmp:
lw a0,0(a0)
lw a5,0(a1)
subw a0,a0,a5
ret
twoSum:
addi sp,sp,-48
sd ra,40(sp)
sd s0,32(sp)
sd s1,24(sp)
sd s2,16(sp)
sd s3,8(sp)
sd s4,0(sp)
mv s0,a0
mv s1... |
22 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O2 | RISC-V 64 gcc 15.2.0 | cmp:
lw a0,0(a0)
lw a5,0(a1)
subw a0,a0,a5
ret
twoSum:
addi sp,sp,-48
addiw a5,a1,1
sd s2,16(sp)
mv s2,a0
slli a0,a5,3
sd s0,32(sp)
sd s1,24(sp)
sd a1,0(sp)
sd ra,40... |
23 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | riscv64 | -O3 | RISC-V 64 gcc 15.2.0 | cmp:
lw a0,0(a0)
lw a5,0(a1)
subw a0,a0,a5
ret
twoSum:
addi sp,sp,-48
addiw a5,a1,1
sd s2,16(sp)
mv s2,a0
slli a0,a5,3
sd s0,32(sp)
sd s1,24(sp)
sd a1,0(sp)
sd ra,40... |
24 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O0 | x86-64 clang 21.1.0 | cmp:
push rbp
mov rbp, rsp
mov qword ptr [rbp - 8], rdi
mov qword ptr [rbp - 16], rsi
mov rax, qword ptr [rbp - 8]
mov eax, dword ptr [rax]
mov rcx, qword ptr [rbp - 16]
sub eax, dword ptr [rcx]
pop rbp
re... |
25 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O1 | x86-64 clang 21.1.0 | cmp:
mov eax, dword ptr [rdi]
sub eax, dword ptr [rsi]
ret
twoSum:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, edx
mov r14d, esi
mov r12, rdi
... |
26 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O2 | x86-64 clang 21.1.0 | cmp:
mov eax, dword ptr [rdi]
sub eax, dword ptr [rsi]
ret
.LCPI1_1:
.long 2
.long 2
.zero 4
.zero 4
.LCPI1_2:
.long 4
.long 4
.zero 4
.zero 4
.LCPI1_3:
.long 0
.long 1
.long 0
... |
27 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O3 | x86-64 clang 21.1.0 | cmp:
mov eax, dword ptr [rdi]
sub eax, dword ptr [rsi]
ret
.LCPI1_1:
.long 2
.long 2
.zero 4
.zero 4
.LCPI1_2:
.long 4
.long 4
.zero 4
.zero 4
.LCPI1_3:
.long 0
.long 1
.long 0
... |
28 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O0 | x86-64 gcc 15.2 | cmp:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-8]
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-16]
mov eax, DWORD PTR [rax]
sub edx, eax
mov ... |
29 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O1 | x86-64 gcc 15.2 | cmp:
mov eax, DWORD PTR [rdi]
sub eax, DWORD PTR [rsi]
ret
twoSum:
push r13
push r12
push rbp
push rbx
sub rsp, 8
mov r13, rdi
mov r12d, esi
mov ebp, edx
lea edi, [rsi+1]
movsx... |
30 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O2 | x86-64 gcc 15.2 | cmp:
mov eax, DWORD PTR [rdi]
sub eax, DWORD PTR [rsi]
ret
twoSum:
push r14
mov r14d, esi
push r13
mov r13, rdi
lea edi, [rsi+1]
push r12
movsx rdi, edi
mov r12d, edx
push rbp
sa... |
31 | 1 | Two Sum | Easy | /*
1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9... | x86-64 | -O3 | x86-64 gcc 15.2 | cmp:
mov eax, DWORD PTR [rdi]
sub eax, DWORD PTR [rsi]
ret
twoSum:
push r14
mov r14d, esi
push r13
mov r13, rdi
lea edi, [rsi+1]
push r12
movsx rdi, edi
mov r12d, edx
push rbp
sa... |
32 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O0 | ARM64 gcc 15.2.0 | addTwoNumbers:
stp x29, x30, [sp, -64]!
mov x29, sp
str x0, [sp, 24]
str x1, [sp, 16]
str xzr, [sp, 56]
str wzr, [sp, 44]
b .L2
.L7:
mov x0, 16
bl malloc
str x0, [sp, 32]
ldr x0, [sp, 2... |
33 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O1 | ARM64 gcc 15.2.0 | addTwoNumbers:
stp x29, x30, [sp, -80]!
mov x29, sp
stp x19, x20, [sp, 16]
stp x21, x22, [sp, 32]
mov x20, x0
orr x0, x0, x1
cbz x0, .L8
stp x23, x24, [sp, 48]
stp x25, x26, [sp, 64]
mov x21, x1
... |
34 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O2 | ARM64 gcc 15.2.0 | addTwoNumbers:
stp x29, x30, [sp, -80]!
mov x29, sp
stp x19, x20, [sp, 16]
mov x20, x1
mov w19, 0
stp x21, x22, [sp, 32]
mov w21, 26215
mov w22, 10
stp x23, x24, [sp, 48]
mov x23, x0
orr x... |
35 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O3 | ARM64 gcc 15.2.0 | addTwoNumbers:
stp x29, x30, [sp, -80]!
mov x29, sp
stp x19, x20, [sp, 16]
mov x20, x1
mov w19, 0
stp x21, x22, [sp, 32]
mov w21, 26215
mov w22, 10
stp x23, x24, [sp, 48]
mov x23, x0
orr x... |
36 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O0 | armv8-a clang 21.1.0 | addTwoNumbers:
sub sp, sp, #64
stp x29, x30, [sp, #48]
add x29, sp, #48
stur x0, [x29, #-8]
stur x1, [x29, #-16]
str xzr, [sp, #24]
str wzr, [sp, #4]
b .LBB0_1
.LBB0_1:
ldur x8, [x29, #-8]
mov w9, #1
... |
37 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O1 | armv8-a clang 21.1.0 | addTwoNumbers:
stp x29, x30, [sp, #-96]!
str x27, [sp, #16]
stp x26, x25, [sp, #32]
stp x24, x23, [sp, #48]
stp x22, x21, [sp, #64]
stp x20, x19, [sp, #80]
mov x29, sp
cmp x0, #0
orr x8, x0, x1
cset w2... |
38 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O2 | armv8-a clang 21.1.0 | addTwoNumbers:
stp x29, x30, [sp, #-96]!
str x27, [sp, #16]
stp x26, x25, [sp, #32]
stp x24, x23, [sp, #48]
stp x22, x21, [sp, #64]
stp x20, x19, [sp, #80]
mov x29, sp
cmp x0, #0
orr x8, x0, x1
cset w2... |
39 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | aarch64 | -O3 | armv8-a clang 21.1.0 | addTwoNumbers:
stp x29, x30, [sp, #-96]!
str x27, [sp, #16]
stp x26, x25, [sp, #32]
stp x24, x23, [sp, #48]
stp x22, x21, [sp, #64]
stp x20, x19, [sp, #80]
mov x29, sp
cmp x0, #0
orr x8, x0, x1
cset w2... |
40 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O0 | mips64 clang 21.1.0 | addTwoNumbers:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -96
sd $ra, 88($sp)
sd $fp, 80($sp)
sd $gp, 72($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(addTwoNumbers)))
daddu $1, $1, $25
daddiu $1, $1, %lo(%neg(%gp_rel(addTwoNumbers)))
... |
41 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O1 | mips64 clang 21.1.0 | addTwoNumbers:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -96
sd $ra, 88($sp)
sd $fp, 80($sp)
sd $gp, 72($sp)
sd $23, 64($sp)
sd $22, 56($sp)
sd $21, 48($sp)
sd $20, 40($sp)
sd $19, 32($sp)
sd $18,... |
42 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O2 | mips64 clang 21.1.0 | addTwoNumbers:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -96
sd $ra, 88($sp)
sd $fp, 80($sp)
sd $gp, 72($sp)
sd $23, 64($sp)
sd $22, 56($sp)
sd $21, 48($sp)
sd $20, 40($sp)
sd $19, 32($sp)
sd $18,... |
43 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O3 | mips64 clang 21.1.0 | addTwoNumbers:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -96
sd $ra, 88($sp)
sd $fp, 80($sp)
sd $gp, 72($sp)
sd $23, 64($sp)
sd $22, 56($sp)
sd $21, 48($sp)
sd $20, 40($sp)
sd $19, 32($sp)
sd $18,... |
44 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O0 | mips64 gcc 15.2.0 | addTwoNumbers:
daddiu $sp,$sp,-80
sd $31,72($sp)
sd $fp,64($sp)
sd $28,56($sp)
move $fp,$sp
lui $28,%hi(%neg(%gp_rel(addTwoNumbers)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(addTwoNumbers)))
sd $4,32($fp)
... |
45 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O1 | mips64 gcc 15.2.0 | addTwoNumbers:
daddiu $sp,$sp,-64
sd $31,56($sp)
sd $28,48($sp)
sd $20,40($sp)
sd $19,32($sp)
sd $18,24($sp)
sd $17,16($sp)
sd $16,8($sp)
lui $28,%hi(%neg(%gp_rel(addTwoNumbers)))
daddu $28,$28,$25
... |
46 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O2 | mips64 gcc 15.2.0 | addTwoNumbers:
daddiu $sp,$sp,-64
sd $28,48($sp)
lui $28,%hi(%neg(%gp_rel(addTwoNumbers)))
sd $17,16($sp)
daddu $28,$28,$25
move $17,$4
sd $20,40($sp)
sd $19,32($sp)
sd $16,8($sp)
sd $31,56($sp)
... |
47 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | mips64 | -O3 | mips64 gcc 15.2.0 | addTwoNumbers:
daddiu $sp,$sp,-64
sd $28,48($sp)
lui $28,%hi(%neg(%gp_rel(addTwoNumbers)))
sd $17,16($sp)
daddu $28,$28,$25
move $17,$4
sd $20,40($sp)
sd $19,32($sp)
sd $16,8($sp)
sd $31,56($sp)
... |
48 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O0 | RISC-V 64 clang 21.1.0 | addTwoNumbers:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
addi s0, sp, 80
sd a0, -24(s0)
sd a1, -32(s0)
li a0, 0
sd a0, -40(s0)
sw a0, -60(s0)
j .LBB0_1
.LBB0_1:
ld a0, -24(s0)
... |
49 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O1 | RISC-V 64 clang 21.1.0 | addTwoNumbers:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
sd s1, 56(sp)
sd s2, 48(sp)
sd s3, 40(sp)
sd s4, 32(sp)
sd s5, 24(sp)
sd s6, 16(sp)
sd s7, 8(sp)
sd s8, 0(sp)
m... |
50 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O2 | RISC-V 64 clang 21.1.0 | addTwoNumbers:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
sd s1, 56(sp)
sd s2, 48(sp)
sd s3, 40(sp)
sd s4, 32(sp)
sd s5, 24(sp)
sd s6, 16(sp)
sd s7, 8(sp)
sd s8, 0(sp)
m... |
51 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O3 | RISC-V 64 clang 21.1.0 | addTwoNumbers:
addi sp, sp, -80
sd ra, 72(sp)
sd s0, 64(sp)
sd s1, 56(sp)
sd s2, 48(sp)
sd s3, 40(sp)
sd s4, 32(sp)
sd s5, 24(sp)
sd s6, 16(sp)
sd s7, 8(sp)
sd s8, 0(sp)
m... |
52 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O0 | RISC-V 64 gcc 15.2.0 | addTwoNumbers:
addi sp,sp,-64
sd ra,56(sp)
sd s0,48(sp)
addi s0,sp,64
sd a0,-56(s0)
sd a1,-64(s0)
sd zero,-24(s0)
sw zero,-36(s0)
j .L2
.L7:
li a0,16
call malloc
mv a5,a... |
53 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O1 | RISC-V 64 gcc 15.2.0 | addTwoNumbers:
addi sp,sp,-64
sd ra,56(sp)
sd s3,24(sp)
or a5,a0,a1
beq a5,zero,.L8
sd s0,48(sp)
sd s1,40(sp)
sd s2,32(sp)
sd s4,16(sp)
sd s5,8(sp)
sd s6,0(sp)
mv s0,a... |
54 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O2 | RISC-V 64 gcc 15.2.0 | addTwoNumbers:
addi sp,sp,-64
sd s3,24(sp)
sd s4,16(sp)
mv s3,a1
mv s4,a0
sd s0,48(sp)
sd s1,40(sp)
sd s2,32(sp)
sd ra,56(sp)
li s2,1717985280
sd s5,8(sp)
or a5,s4,s3... |
55 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | riscv64 | -O3 | RISC-V 64 gcc 15.2.0 | addTwoNumbers:
addi sp,sp,-64
sd s3,24(sp)
sd s4,16(sp)
mv s3,a1
mv s4,a0
sd s0,48(sp)
sd s1,40(sp)
sd s2,32(sp)
sd ra,56(sp)
li s2,1717985280
sd s5,8(sp)
or a5,s4,s3... |
56 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O0 | x86-64 clang 21.1.0 | addTwoNumbers:
push rbp
mov rbp, rsp
sub rsp, 48
mov qword ptr [rbp - 8], rdi
mov qword ptr [rbp - 16], rsi
mov qword ptr [rbp - 24], 0
mov dword ptr [rbp - 44], 0
.LBB0_1:
mov al, 1
cmp qword ptr [rbp - 8], 0
... |
57 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O1 | x86-64 clang 21.1.0 | addTwoNumbers:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
setne bpl
test rsi, rsi
setne r14b
xor r12d, r12d
mov rax, rdi
or rax, r... |
58 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O2 | x86-64 clang 21.1.0 | addTwoNumbers:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
setne bpl
test rsi, rsi
setne r14b
xor r12d, r12d
mov rax, rdi
or rax, r... |
59 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O3 | x86-64 clang 21.1.0 | addTwoNumbers:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
setne bpl
test rsi, rsi
setne r14b
xor r12d, r12d
mov rax, rdi
or rax, r... |
60 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O0 | x86-64 gcc 15.2 | addTwoNumbers:
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-8], 0
mov DWORD PTR [rbp-20], 0
jmp .L2
.L7:
mov edi, 16
call malloc
m... |
61 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O1 | x86-64 gcc 15.2 | addTwoNumbers:
push r14
push r13
push r12
push rbp
push rbx
mov rax, rdi
or rax, rsi
je .L8
mov rbp, rdi
mov r12, rsi
mov ebx, 0
mov r13d, 0
.L10:
mov r14, rdx
... |
62 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O2 | x86-64 gcc 15.2 | addTwoNumbers:
push r14
xor r14d, r14d
push r13
push r12
mov r12, rdi
push rbp
mov rbp, rsi
push rbx
xor ebx, ebx
jmp .L2
.L21:
test ebx, ebx
je .L1
mov edi, 16
... |
63 | 2 | Add Two Numbers | Medium | /*
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
You may assume the two numbers do not contain any leading zero, except the n... | x86-64 | -O3 | x86-64 gcc 15.2 | addTwoNumbers:
push r14
xor r14d, r14d
push r13
push r12
mov r12, rdi
push rbp
mov rbp, rsi
push rbx
xor ebx, ebx
jmp .L2
.L21:
test ebx, ebx
je .L1
mov edi, 16
... |
64 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O0 | ARM64 gcc 15.2.0 | lengthOfLongestSubstring:
sub sp, sp, #576
stp x29, x30, [sp]
mov x29, sp
str x0, [sp, 24]
str wzr, [sp, 568]
add x0, sp, 40
mov x1, 512
mov x2, x1
mov w1, 0
bl memset
str wzr, [sp, 564]
... |
65 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O1 | ARM64 gcc 15.2.0 | lengthOfLongestSubstring:
sub sp, sp, #544
stp x29, x30, [sp]
mov x29, sp
str x19, [sp, 16]
mov x19, x0
mov x2, 512
mov w1, 0
add x0, sp, 32
bl memset
ldrb w2, [x19]
cbz w2, .L4
mo... |
66 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O2 | ARM64 gcc 15.2.0 | lengthOfLongestSubstring:
sub sp, sp, #544
mov x2, 512
mov w1, 0
stp x29, x30, [sp]
mov x29, sp
str x19, [sp, 16]
mov x19, x0
add x0, sp, 32
bl memset
ldrb w2, [x19]
cbz w2, .L4
su... |
67 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O3 | ARM64 gcc 15.2.0 | lengthOfLongestSubstring:
sub sp, sp, #544
mov x2, 512
mov w1, 0
stp x29, x30, [sp]
mov x29, sp
str x19, [sp, 16]
mov x19, x0
add x0, sp, 32
bl memset
ldrb w2, [x19]
cbz w2, .L4
su... |
68 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O0 | armv8-a clang 21.1.0 | lengthOfLongestSubstring:
stp x29, x30, [sp, #-32]!
str x28, [sp, #16]
mov x29, sp
sub sp, sp, #576
sub x8, x29, #8
str x8, [sp, #8]
str x0, [x8]
mov w1, wzr
stur wzr, [x29, #-24]
add x0, sp, #36
... |
69 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O1 | armv8-a clang 21.1.0 | lengthOfLongestSubstring:
str x30, [sp, #-16]!
sub sp, sp, #512
movi v0.2d, #0000000000000000
ldrb w9, [x0]
stp q0, q0, [sp]
stp q0, q0, [sp, #32]
stp q0, q0, [sp, #64]
stp q0, q0, [sp, #96]
stp q0, q0, [sp, #128]
... |
70 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O2 | armv8-a clang 21.1.0 | lengthOfLongestSubstring:
str x30, [sp, #-16]!
sub sp, sp, #512
movi v0.2d, #0000000000000000
ldrb w9, [x0]
stp q0, q0, [sp]
stp q0, q0, [sp, #32]
stp q0, q0, [sp, #64]
stp q0, q0, [sp, #96]
stp q0, q0, [sp, #128]
... |
71 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | aarch64 | -O3 | armv8-a clang 21.1.0 | lengthOfLongestSubstring:
str x30, [sp, #-16]!
sub sp, sp, #512
movi v0.2d, #0000000000000000
ldrb w9, [x0]
stp q0, q0, [sp]
stp q0, q0, [sp, #32]
stp q0, q0, [sp, #64]
stp q0, q0, [sp, #96]
stp q0, q0, [sp, #128]
... |
72 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O0 | mips64 clang 21.1.0 | lengthOfLongestSubstring:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -592
sd $ra, 584($sp)
sd $fp, 576($sp)
sd $gp, 568($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(lengthOfLongestSubstring)))
daddu $1, $1, $25
daddiu $gp, $1, %lo(%ne... |
73 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O1 | mips64 clang 21.1.0 | lengthOfLongestSubstring:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -560
sd $ra, 552($sp)
sd $fp, 544($sp)
sd $gp, 536($sp)
sd $17, 528($sp)
sd $16, 520($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(lengthOfLongestSubstring)))
... |
74 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O2 | mips64 clang 21.1.0 | lengthOfLongestSubstring:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -560
sd $ra, 552($sp)
sd $fp, 544($sp)
sd $gp, 536($sp)
sd $17, 528($sp)
sd $16, 520($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(lengthOfLongestSubstring)))
... |
75 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O3 | mips64 clang 21.1.0 | lengthOfLongestSubstring:
.Lfunc_begin0 = .Ltmp0
daddiu $sp, $sp, -560
sd $ra, 552($sp)
sd $fp, 544($sp)
sd $gp, 536($sp)
sd $17, 528($sp)
sd $16, 520($sp)
move $fp, $sp
lui $1, %hi(%neg(%gp_rel(lengthOfLongestSubstring)))
... |
76 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O0 | mips64 gcc 15.2.0 | lengthOfLongestSubstring:
daddiu $sp,$sp,-592
sd $31,584($sp)
sd $fp,576($sp)
sd $28,568($sp)
move $fp,$sp
lui $28,%hi(%neg(%gp_rel(lengthOfLongestSubstring)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(lengthOfLongestSubst... |
77 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O1 | mips64 gcc 15.2.0 | lengthOfLongestSubstring:
daddiu $sp,$sp,-544
sd $31,536($sp)
sd $28,528($sp)
sd $16,520($sp)
lui $28,%hi(%neg(%gp_rel(lengthOfLongestSubstring)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(lengthOfLongestSubstring)))
move ... |
78 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O2 | mips64 gcc 15.2.0 | lengthOfLongestSubstring:
daddiu $sp,$sp,-544
sd $28,528($sp)
lui $28,%hi(%neg(%gp_rel(lengthOfLongestSubstring)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(lengthOfLongestSubstring)))
ld $25,%call16(memset)($28)
sd $16,520($sp)
... |
79 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | mips64 | -O3 | mips64 gcc 15.2.0 | lengthOfLongestSubstring:
daddiu $sp,$sp,-544
sd $28,528($sp)
lui $28,%hi(%neg(%gp_rel(lengthOfLongestSubstring)))
daddu $28,$28,$25
daddiu $28,$28,%lo(%neg(%gp_rel(lengthOfLongestSubstring)))
ld $25,%call16(memset)($28)
sd $16,520($sp)
... |
80 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O0 | RISC-V 64 clang 21.1.0 | lengthOfLongestSubstring:
addi sp, sp, -608
sd ra, 600(sp)
sd s0, 592(sp)
addi s0, sp, 608
sd a0, -24(s0)
li a1, 0
sd a1, -584(s0)
sw a1, -40(s0)
addi a0, s0, -556
li a2, 512
call memse... |
81 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O1 | RISC-V 64 clang 21.1.0 | lengthOfLongestSubstring:
addi sp, sp, -544
sd ra, 536(sp)
sd s0, 528(sp)
sd s1, 520(sp)
mv s0, a0
addi a0, sp, 8
li a2, 512
addi s1, sp, 8
li a1, 0
call memset
lbu a3, 0(s0)
beq... |
82 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O2 | RISC-V 64 clang 21.1.0 | lengthOfLongestSubstring:
addi sp, sp, -544
sd ra, 536(sp)
sd s0, 528(sp)
sd s1, 520(sp)
mv s0, a0
addi a0, sp, 8
li a2, 512
addi s1, sp, 8
li a1, 0
call memset
lbu a3, 0(s0)
beq... |
83 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O3 | RISC-V 64 clang 21.1.0 | lengthOfLongestSubstring:
addi sp, sp, -544
sd ra, 536(sp)
sd s0, 528(sp)
sd s1, 520(sp)
mv s0, a0
addi a0, sp, 8
li a2, 512
addi s1, sp, 8
li a1, 0
call memset
lbu a3, 0(s0)
beq... |
84 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O0 | RISC-V 64 gcc 15.2.0 | lengthOfLongestSubstring:
addi sp,sp,-576
sd ra,568(sp)
sd s0,560(sp)
addi s0,sp,576
sd a0,-568(s0)
sw zero,-24(s0)
addi a5,s0,-552
li a4,512
mv a2,a4
li a1,0
mv a0,a5
call ... |
85 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O1 | RISC-V 64 gcc 15.2.0 | lengthOfLongestSubstring:
addi sp,sp,-528
sd ra,520(sp)
sd s0,512(sp)
mv s0,a0
li a2,512
li a1,0
mv a0,sp
call memset
lbu a5,0(s0)
beq a5,zero,.L6
addi a2,s0,1
li a3,0
... |
86 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O2 | RISC-V 64 gcc 15.2.0 | lengthOfLongestSubstring:
addi sp,sp,-528
sd s0,512(sp)
li a2,512
mv s0,a0
li a1,0
mv a0,sp
sd ra,520(sp)
call memset
lbu a5,0(s0)
beq a5,zero,.L6
mv a6,a0
addi a1,s0,1
... |
87 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | riscv64 | -O3 | RISC-V 64 gcc 15.2.0 | lengthOfLongestSubstring:
addi sp,sp,-528
sd s0,512(sp)
li a2,512
mv s0,a0
li a1,0
mv a0,sp
sd ra,520(sp)
call memset
lbu a5,0(s0)
beq a5,zero,.L6
mv a6,a0
addi a1,s0,1
... |
88 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O0 | x86-64 clang 21.1.0 | lengthOfLongestSubstring:
push rbp
mov rbp, rsp
sub rsp, 576
mov qword ptr [rbp - 8], rdi
mov dword ptr [rbp - 24], 0
lea rdi, [rbp - 544]
xor esi, esi
mov edx, 512
call memset@PLT
mov dword ptr [rbp - ... |
89 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O1 | x86-64 clang 21.1.0 | lengthOfLongestSubstring:
push rbp
push rbx
sub rsp, 520
mov rbx, rdi
mov rdi, rsp
xor ebp, ebp
mov edx, 512
xor esi, esi
call memset@PLT
movzx ecx, byte ptr [rbx]
test cl, cl
je .L... |
90 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O2 | x86-64 clang 21.1.0 | lengthOfLongestSubstring:
push rbp
push rbx
sub rsp, 520
mov rbx, rdi
mov rdi, rsp
xor ebp, ebp
mov edx, 512
xor esi, esi
call memset@PLT
movzx ecx, byte ptr [rbx]
test cl, cl
je .L... |
91 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O3 | x86-64 clang 21.1.0 | lengthOfLongestSubstring:
push rbp
push rbx
sub rsp, 520
mov rbx, rdi
mov rdi, rsp
xor ebp, ebp
mov edx, 512
xor esi, esi
call memset@PLT
movzx ecx, byte ptr [rbx]
test cl, cl
je .L... |
92 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O0 | x86-64 gcc 15.2 | lengthOfLongestSubstring:
push rbp
mov rbp, rsp
sub rsp, 440
mov QWORD PTR [rbp-552], rdi
mov DWORD PTR [rbp-8], 0
lea rdx, [rbp-544]
mov eax, 0
mov ecx, 64
mov rdi, rdx
rep stosq
mov DWORD PTR... |
93 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O1 | x86-64 gcc 15.2 | lengthOfLongestSubstring:
sub rsp, 400
mov rsi, rdi
lea rdi, [rsp-120]
mov ecx, 64
mov eax, 0
rep stosq
movzx edx, BYTE PTR [rsi]
test dl, dl
je .L4
lea rdi, [rsi+1]
mov r8d, 0
mov e... |
94 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O2 | x86-64 gcc 15.2 | lengthOfLongestSubstring:
mov rsi, rdi
sub rsp, 400
mov ecx, 64
xor eax, eax
movsx rdx, BYTE PTR [rsi]
lea rdi, [rsp-120]
rep stosq
test dl, dl
je .L4
lea rdi, [rsi+1]
xor r8d, r8d
xor ... |
95 | 3 | Longest Substring Without Repeating Characters | Medium | /*
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters.
Examples:
Given "abcabcbb", the answer is "abc", which the length is 3.
Given "bbbbb", the answer is "b", with the length of 1.
Given "pwwkew", the answer is "wke", with the l... | x86-64 | -O3 | x86-64 gcc 15.2 | lengthOfLongestSubstring:
mov rsi, rdi
sub rsp, 400
mov ecx, 64
xor eax, eax
movsx rdx, BYTE PTR [rsi]
lea rdi, [rsp-120]
rep stosq
test dl, dl
je .L4
lea rdi, [rsi+1]
xor r8d, r8d
xor ... |
96 | 4 | Median of Two Sorted Arrays | Hard | /*
4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Example 1:
nums1 = [1, 3]
nums2 = [2]
The median is 2.0
Example 2:
nums1 = [1, 2]
nums2 = [3, 4]
The media... | aarch64 | -O0 | ARM64 gcc 15.2.0 | bs:
sub sp, sp, #32
str x0, [sp, 8]
str w1, [sp, 4]
str w2, [sp]
str wzr, [sp, 28]
ldr w0, [sp, 4]
sub w0, w0, #1
str w0, [sp, 24]
b .L2
.L4:
ldr w1, [sp, 24]
ldr w0, [sp, 28]
su... |
97 | 4 | Median of Two Sorted Arrays | Hard | /*
4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Example 1:
nums1 = [1, 3]
nums2 = [2]
The median is 2.0
Example 2:
nums1 = [1, 2]
nums2 = [3, 4]
The media... | aarch64 | -O1 | ARM64 gcc 15.2.0 | bs:
mov x5, x0
subs w0, w1, #1
bmi .L1
mov w4, 0
b .L5
.L3:
add w4, w3, 1
.L4:
cmp w0, w4
blt .L1
.L5:
sub w3, w0, w4
add w3, w3, w3, lsr 31
add w3, w4, w3, asr 1
ldr w1, [x5,... |
98 | 4 | Median of Two Sorted Arrays | Hard | /*
4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Example 1:
nums1 = [1, 3]
nums2 = [2]
The median is 2.0
Example 2:
nums1 = [1, 2]
nums2 = [3, 4]
The media... | aarch64 | -O2 | ARM64 gcc 15.2.0 | bs:
subs w1, w1, #1
bmi .L1
mov w4, 0
b .L5
.L8:
sub w1, w3, #1
cmp w4, w1
bgt .L1
.L5:
sub w3, w1, w4
add w3, w4, w3, asr 1
ldr w5, [x0, w3, sxtw 2]
cmp w2, w5
blt .L8
... |
99 | 4 | Median of Two Sorted Arrays | Hard | /*
4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.
Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Example 1:
nums1 = [1, 3]
nums2 = [2]
The median is 2.0
Example 2:
nums1 = [1, 2]
nums2 = [3, 4]
The media... | aarch64 | -O3 | ARM64 gcc 15.2.0 | bs:
subs w1, w1, #1
bmi .L1
mov w4, 0
b .L5
.L8:
sub w1, w3, #1
cmp w4, w1
bgt .L1
.L5:
sub w3, w1, w4
add w3, w4, w3, asr 1
ldr w5, [x0, w3, sxtw 2]
cmp w2, w5
blt .L8
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.