Commit Graph

1077 Commits

Author SHA1 Message Date
shoniavika
426ecd03f1
Added queue implementation using two stacks (#953)
* added queue implementation using 2 stacks

* added empty queue error handling

* added empty queue error handling

* updated format

* deleted macro

* added documentation

* updated documentation, new func for testing

* added copyright

* documented queue class

* made queue a generic one

* handles lvalue error & added consts

* added namespace
2020-07-18 17:01:03 -04:00
Deep Raval
cac5fbe4aa
feat: add Bogo Sort (#952)
* Added Bogo Sort

* Changed code according to guidelines

* Added Comments and example

* Improved code quality

* Added range based loop and included cassert

* Changed Vectors to Array

* Added const to vector arg and now returning sorted array

* Changed vector to array and changed description format

* Added namespace sorting, Function description and tests

* Update sorting/Bogo_Sort.cpp

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>

* Replaced Shuffle with std::random_shuffle

* Renamed filename to smallercase, Added shuffle for ref and updated bracket styling

* Added missing ')'

* updating DIRECTORY.md

* Added spaces in single line comments

* Added Spaces

* Update sorting/bogo_sort.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: David Leal <halfpacho@gmail.com>
2020-07-17 18:27:40 -04:00
github-actions
076d156302 updating DIRECTORY.md 2020-07-13 13:34:13 +00:00
Ayaan Khan
ef13806cd6
Merge pull request #941 from enqidu/skip_list
Skip list
2020-07-13 19:02:48 +05:30
Krishna Vedala
eefe46688d
main function must return 2020-07-13 08:07:44 -04:00
Krishna Vedala
dc4a72c418
fix doc comment block 2020-07-13 08:07:10 -04:00
Krishna Vedala
8ab9a2ae93
[cpp fixes] tidied up code based on error reports by clang-tidy (#950)
* tidied up code based on error reports by clang-tidy

* added doc for activation function
2020-07-13 07:52:38 -04:00
Krishna Vedala
47f5ad9aaf
fix randomlevel float conversion 2020-07-12 17:47:57 -04:00
Krishna Vedala
c15c962f02
since we are using smart pointers, an explicit destructor is not required 2020-07-12 17:04:09 -04:00
Krishna Vedala
f970ce361c
tidied up code based on error reports by clang-tidy 2020-07-12 17:00:27 -04:00
enqidu
ddf148b613 Merge branch 'skip_list' of https://github.com/enqidu/C-Plus-Plus into skip_list 2020-07-12 19:25:14 +04:00
enqidu
a707d710b5 update 2020-07-12 19:24:46 +04:00
Krishna Vedala
1f32b4e412
Fix command syntax (#949) 2020-07-12 07:24:57 -04:00
Krishna Vedala
6668742620
Merge pull request #948 from kvedala/clang-tidy
[bug] disable move error + enforce c++11 for clang-tidy
2020-07-11 15:12:47 -04:00
Krishna Vedala
4e12f03c6c
disable move error + enforce c++11 for clang-tidy 2020-07-11 15:09:00 -04:00
Krishna Vedala
d34bede6f4
disable error on cppcoreguidelines-owning-memory
see https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-owning-memory.html for details
2020-07-11 09:11:31 -04:00
Krishna Vedala
d5d9152420
Merge pull request #947 from kvedala/clang-tidy
[improvements] Clang tidy
2020-07-10 22:21:55 -04:00
Krishna Vedala
2ca13dd45a
Revert "test commit"
This reverts commit dc6f322975.
2020-07-10 22:16:14 -04:00
Krishna Vedala
dc6f322975
test commit 2020-07-10 22:00:57 -04:00
Krishna Vedala
523475b183
mark all warnings as errors except those that are fixable by clang-tidy 2020-07-10 21:58:22 -04:00
Krishna Vedala
9a5a62cf12
pass multiple files 2020-07-10 21:47:39 -04:00
Krishna Vedala
389d50ea14
disable all insecureAPI errors 2020-07-10 19:05:42 -04:00
Krishna Vedala
229334cce6
treat clang-tidy warnings as errors 2020-07-10 18:37:35 -04:00
Krishna Vedala
bade26ecca
disable rand error 2020-07-10 18:25:13 -04:00
github-actions
1fbd0d59ac updating DIRECTORY.md 2020-07-10 21:38:04 +00:00
Krishna Vedala
5fcf15019e
added clang-analyzer checks 2020-07-10 16:41:13 -04:00
enqidu
af49a02ed8
Update data_structures/skip_list.cpp
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-07-10 21:27:51 +04:00
enqidu
5d225aba87
Update data_structures/skip_list.cpp
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-07-10 21:27:35 +04:00
enqidu
b1b3b310a4
Update data_structures/skip_list.cpp
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-07-10 21:27:22 +04:00
enqidu
2fecf67a36 parameters 2020-07-10 21:11:20 +04:00
enqidu
a90dcc5f66 parameters 2020-07-10 21:10:21 +04:00
Krishna Vedala
05bb23ca27
[enhancement] New Graphics implementation with algorithm for spirograph (#936)
* added spirograph program

* add graphics forlder to cmake

* updating DIRECTORY.md

* enable VNC for GUI programs on gitpod

* fix cpplint error

* fix macro definitions for correct documentation

* fix filename in docs

* move include from namespace to global

* download and build freeglut if not available

* install opengl libraries for build check

* fix syntax error

* fix quotes

* install mesa-utils instead

* use markepplace tool instead of installing

* fix syntax

* undo changes to github actions

* OpenGL not mandatory

* add private option to compile definition

* fix: corrected to compile definitions instead of options

* use the macro USE_GLUT

* compile FREEGLUT as a subdirectory. this maintains a consistency

* build freeglut_static when GLUT library not available

* provide keyboard control

* clang-tidy fixes for cb284bddb2

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2020-07-10 12:47:37 -04:00
enqidu
d59005678d documentation 2020-07-10 20:40:00 +04:00
enqidu
ab1ddb364f documentation 2020-07-10 20:39:33 +04:00
Ayaan Khan
8067850dfa
Merge pull request #942 from sprintyaf/fibonacci_search
Added Fibonacci search
2020-07-10 21:54:40 +05:30
Krishna Vedala
02d947777b
[enhancement] Replace cpplint with clang-tidy (#943)
* test commit for using clang-tidy instead of cpplint

* add suffix -- to clang-tidy & commit

* fixes to git commit

* commenting redundant clang-format as clang-tidy will take care of that

* add clang-tidy config file

* use clang-tidy config file

* test dump config to ensure config is read correctly

* move test to top

* test passed, removing test code

Test link: https://github.com/TheAlgorithms/C-Plus-Plus/pull/943/checks?check_run_id=851231578

* fix clang-tidy config

* set clang-tidy standard to c++11

* provide clang-tidy with compilation details

* fix build path argument & Use clang-9

(cherry picked from commit 5eddf0cd9536f328a6a3485b5ed59705618a1433)

* Merge commit '433568f9fa7c3e7f1b2e0c86c1864e92ad2668c8'

* Use clang-9

* fix subprocess.STDOUT

* remove pipe for stdout

* bumot o clang-tidy-10

* Revert "Merge commit '433568f9fa7c3e7f1b2e0c86c1864e92ad2668c8'"

This reverts commit 2a7462056a.

* add docs
2020-07-10 11:32:37 -04:00
sprintyaf
58099884dd comments added 2020-07-10 19:13:16 +04:00
Rajiv Ranjan Singh
ebd13a7e24
Improved sieve_of_eratosthenes.cpp (#933)
* Update sieve_of_eratosthenes.cpp

* removed unwanted spaces

* removed init function

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
2020-07-10 11:02:59 -04:00
Krishna Vedala
bf2dac6de2
enable gitpod for all branches 2020-07-10 10:43:05 -04:00
Krishna Vedala
497d627ebd
[improvement] updated contribution guidelines (#945)
* updated contribution guidelines

* fix case
2020-07-09 18:15:05 -04:00
enqidu
bba0db36ec sk 2020-07-08 20:47:43 +04:00
enqidu
4ce394e38d Merge branch 'skip_list' of https://github.com/enqidu/C-Plus-Plus into skip_list 2020-07-08 20:46:53 +04:00
enqidu
a5ca794aa4 sk 2020-07-08 20:46:50 +04:00
enqidu
59a8b3d4a2
Update data_structures/skip_list.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
2020-07-08 20:43:52 +04:00
Krishna Vedala
0e9585d080
remove Copyright from docs 2020-07-08 12:30:13 -04:00
sprintyaf
644524337a copyright removed 2020-07-07 22:53:12 +04:00
sprintyaf
cf6b77a7dc rand fixed 2020-07-07 20:45:03 +04:00
sprintyaf
8216a3267f randomized tests, documentation, back to vector 2020-07-07 20:38:40 +04:00
enqidu
45b21f2871 improve 2020-07-07 20:29:37 +04:00
enqidu
662841bac7 improve 2020-07-07 19:59:54 +04:00