https://github.com/islatri/leetkocpp
A cargo-like runner for C/C++/Rust LeetCode problems
https://github.com/islatri/leetkocpp
algorithms c cpp leetcode leetcode-c leetcode-cpp leetcode-rust rust
Last synced: about 2 months ago
JSON representation
A cargo-like runner for C/C++/Rust LeetCode problems
- Host: GitHub
- URL: https://github.com/islatri/leetkocpp
- Owner: Islatri
- License: mit
- Created: 2025-08-18T03:02:04.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-18T17:13:37.000Z (2 months ago)
- Last Synced: 2025-08-18T18:32:56.066Z (2 months ago)
- Topics: algorithms, c, cpp, leetcode, leetcode-c, leetcode-cpp, leetcode-rust, rust
- Language: C
- Homepage:
- Size: 51.8 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LeetkoCpp
A cargo-like runner for C/C++/Rust LeetCode problems
```bash
PS D:\CodeZone\CppZone\LeetkoCpp> npm run run:cpp group_anagrams> leetko-cpp@1.1.0 run:cpp
> node run.js --cpp group_anagrams🔨 Building project...
🔨 Building C/C++ projects...
Running CMake...
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- Building specific example: group_anagrams
-- Added C++ target: group_anagrams
-- Found both C and C++ versions of 'group_anagrams', C version will be named 'group_anagrams_c'
-- Added C target: group_anagrams_c
-- Total targets: group_anagrams;group_anagrams_c
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: D:/CodeZone/CppZone/LeetkoCpp/build
Building with MSBuild...
MSBuild version 17.12.12+1cce77968 for .NET Frameworkgroup_anagrams.cpp
group_anagrams.vcxproj -> D:\CodeZone\CppZone\LeetkoCpp\build\bin\Release\group_anagrams.exe
✅ Build completed!
🚀 Running group_anagrams (🔷 CPP)...📍 Executable: build\bin\Release\group_anagrams.exe
Test case 1:
[eat, tea, ate]
[tan, nat]
[bat]
All tests passed! ✅📊 Process exited with code 0
``````bash
PS D:\CodeZone\CppZone\LeetkoCpp> npm run run:c two_sum> leetko-cpp@1.1.0 run:c
> node run.js --c two_sum🔨 Building project...
🔨 Building C/C++ projects...
Running CMake...
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- Building specific example: two_sum
-- Added C++ target: two_sum
-- Found both C and C++ versions of 'two_sum', C version will be named 'two_sum_c'
-- Added C target: two_sum_c
-- Total targets: two_sum;two_sum_c
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: D:/CodeZone/CppZone/LeetkoCpp/build
Building with MSBuild...
MSBuild version 17.12.12+1cce77968 for .NET Frameworktwo_sum.vcxproj -> D:\CodeZone\CppZone\LeetkoCpp\build\bin\Release\two_sum.exe
✅ Build completed!
🚀 Running two_sum (🔹 C)...📍 Executable: build\bin\Release\two_sum_c.exe
Test case 1: [0, 1]
Test case 2: [1, 2]
Test case 3: [0, 1]
All tests completed! ✅📊 Process exited with code 0
``````bash
PS D:\CodeZone\CppZone\LeetkoCpp> npm run run:rust longest_consecutive_sequence> leetko-cpp@1.1.0 run:rust
> node run.js --rust longest_consecutive_sequence🔨 Building project...
🦀 Building Rust projects...
Compiling longest_consecutive_sequence.rs...
✅ Build completed!
🚀 Running longest_consecutive_sequence (🦀 RUST)...📍 Executable: build\rust\longest_consecutive_sequence.exe
Test case 1:
Expected: 4, Got: 4
Test case 2:
Expected: 9, Got: 9
Test case 3:
Expected: 0, Got: 0
Test case 4:
Expected: 3, Got: 3
All tests passed! ✅📊 Process exited with code 0
```