* created prime_seive.c
This function counts the number of prime numbers in O(nlogn) time.
* Apply suggestions from code review
Co-authored-by: David Leal <halfpacho@gmail.com>
* updating DIRECTORY.md
* updated prime_seive.c
* Update misc/prime_seive.c
Co-authored-by: David Leal <halfpacho@gmail.com>
* added more changes
please take a look at it
* changed 1000000 to MAX_SIZE
* updated line 10
* changed the code back to original
* eliminated the problem of MAX_SIZE
* added for loop to initialise all elements to 0
* made the changes
* changed the code back to original
i have changed my code back to original as some tests were failing
* removed extra spaces & edited some lines
* added new global variable
* added extra space
* added parameter & return statement
Co-authored-by: David Leal <halfpacho@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Add another hexadecimal to octal conversion
* Apply suggestions
Also changed the return type of `hex_to_oct` to `const char *`, as it
returns an address of static variable.
* Update comment of hexadecimal_to_octal2.c
* updating DIRECTORY.md
* Apply suggestions
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Doubly linked list, simple code.
#633
* organizing code a bit more
* add link in DIRECTORY.md and more comments/cleaning.
* remove global variables and redundancy.
* add Wikipedia reference
* add documentation comments in all functions/headers
* add update in file brief
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
* remove part of file @details
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
* added hash folder to CMAKE build
* split sdbm code from hash.c to independent program
* update readme file
* docs + vartype fix
* split djb2 code from hash.c to independent program
* fix function reference
* split xor8 code from hash.c to independent program
* split adler32 code from hash.c to independent program
* remove additional author
* split crc32 code from hash.c to independent program
* remove redundant files
* interpret large numbers as specific types
* disable eror clang-diagnostic-implicitly-unsigned-literal
* force use constants
* updating DIRECTORY.md
* clang-tidy fixes for 606e5d4fce
* added return in function doc to enable doc
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* skeleton of spirograph
* add graphics to cmake
* updating DIRECTORY.md
* added cmake to graphics folder
* add stub test function
* working program
* set pre-processor macro if GLUT is available
* use snprintf
details: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm
* conditional include for mac
* corrected conditional include for mac
* fix cmake for MACOS
* OpenGL animation if available, else plot to CSV
* MacOS does not provide glutBitmapString function
* formatting source-code for 8d570b4c28
* fix parameter
* try caps include path GL
* provide custom glutBitmapString cuntion
* add glut library to gitpod docker
* enable VNC in gitpod
* better documentation and cmake configuration
* enable keyboard inputs to pause and change parameters
* fix lgtm alerts
* implementation similar to one in C++ repo
* fix compilation errors on MSVC
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* commit '9d51b08a816693281b2890671e9b5fdcbded5b12':
Add return value in deque()
Remove the white space
Typo in variable name
Add the return value in create _heap()
updating DIRECTORY.md
Fix#509
Increased spead of Cocktail Sort
Add new sorting algorithm (Cocktail Sort)
Changed function name
Add new sorting algorithm
updating DIRECTORY.md
dynamic array data structure
Add syntax highlight
index now starts from 1
# Conflicts:
# client_server/client.c
# sorting/Bubble_Sort_2.c
* project_euler/problem_23:
updating DIRECTORY.md
move time computation inside loop + comments
faster parallleization
time computation inside the loop & print loop info
added comments
sol1 optimized by storing abundant numbers in a condensed array
brute-force - compute abundant numbers every time
# Conflicts:
# DIRECTORY.md
* sorting/shell_sort:
add stats for algo 2 and use milliseconds
create a duplicate array
added new shell-sort algorithm
updating DIRECTORY.md
+a much faster fibonacci computation algorithm
print hashes in HEX
add commandline option to FibonacciDP.c
print hashes in HEX
add commandline option to FibonacciDP.c
# Project Euler solutions
## [Problem 08](https://projecteuler.net/problem=8)
* `sol1.c1` uses brute-force method, reads the digits `num_digits` times. It requires `num_digits^2` multiplication operations.
* `sol2.c` is optimized and requires only one read and `num_digits` multiplications and `num_digits` divisions.
## [Problem 09](https://projecteuler.net/problem=9)
Two solution - `sol1.c` uses brute force search and `sol2.c` simplifies the search by creating relations of two unknowns `b` and `c` in terms of the search parameter `a`.
## [Problem 10](https://projecteuler.net/problem=10)
* update `.gitignore` to ignore build outputs (*.exe files on windows OS) and visual studio code config folder.
* `sol1.c` uses brute force sequential method to search for primes and requires multiple loops.
* `sol2.c` uses Sieve of Eratosthenes to simplify the search for primes.
## [Problem 12](https://projecteuler.net/problem=12)
* compute triangle numbers on the fly and uses a half-loop search for divisors.
## [Problem 13](https://projecteuler.net/problem=13)
* implemented using numbers of arbitrary length, limited only by memory constrains and time.
## [Problem 14](https://projecteuler.net/problem=14)
* optimized solution with an option to compile using OpenMP for parallelization
## [Problem 15](https://projecteuler.net/problem=15)
* compute triangle numbers on the fly and uses a half-loop search for divisors.
## [Problem 16](https://projecteuler.net/problem=16)
* computes any power of 2 and the sum of its digits.