Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/it1shka/sofixit
My solution for 'Code Wars' competition
https://github.com/it1shka/sofixit
Last synced: about 1 month ago
JSON representation
My solution for 'Code Wars' competition
- Host: GitHub
- URL: https://github.com/it1shka/sofixit
- Owner: it1shka
- Created: 2023-10-18T11:34:31.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-20T00:28:25.000Z (about 1 year ago)
- Last Synced: 2023-10-20T09:22:39.050Z (about 1 year ago)
- Language: C++
- Homepage: https://it1shka.github.io/material-visualization/
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Submission for competition "Code Wars" by Sofixit company
## Check out my Web Visualization:
[GitHub Pages](https://it1shka.github.io/material-visualization/)
[GitHub Repo](https://github.com/it1shka/material-visualization)## Performance
**10** elements -- **15 ns**
**100** elements -- **50 ns**
**1000** elements -- **460 ns**
**1000000** elements -- **0.46 ms**Written in C++23 (C++17 also should work fine)
In *__solution/function.h__* you will find definition of my
best function so far:
```cpp
template
auto materialFast(const std::array& spaceship) -> int;
```as well as some other attemps which are not that good
In *__tests/function_tests.cpp__* you will find a file
that provides test cases for my solutionThe way you can launch tests is
__building the *sofixit_tests* target with CMake__Please, make sure that you have installed CMake 3.23
Tests can be compiled and run in the following manner:
```shell
# cloning my repo from github
git clone https://github.com/it1shka/sofixit
cd sofixit
# initializing CMake
cmake .
# building and running tests
cmake --build tests
cd tests
./sofixit_tests
```