Krishna Vedala
b4e2c13a8e
add stats for algo 2 and use milliseconds
2020-04-01 23:48:42 -04:00
Krishna Vedala
7ed48fffa5
create a duplicate array
2020-04-01 23:48:04 -04:00
Krishna Vedala
c697587605
added new shell-sort algorithm
2020-04-01 23:46:59 -04:00
github-actions
516a94e5ae
updating DIRECTORY.md
2020-04-02 01:10:10 +00:00
Krishna Vedala
858856ea76
speed optimized solution + optional OpenMP
2020-04-01 21:09:42 -04:00
Krishna Vedala
d972d473f6
added computational time
2020-04-01 19:58:45 -04:00
Krishna Vedala
7706011fe0
added additional summary
2020-04-01 19:41:57 -04:00
github-actions
4311f170ff
updating DIRECTORY.md
2020-04-01 23:36:41 +00:00
Krishna Vedala
2c7944864b
make tmp variable unsigned
2020-04-01 19:35:45 -04:00
Krishna Vedala
d8ede0523a
added comments
2020-04-01 19:31:52 -04:00
Krishna Vedala
9083ea41dc
fixed signedness
2020-04-01 19:26:41 -04:00
Krishna Vedala
b7c579f79d
method 1 using linked lists for digits
2020-04-01 19:24:12 -04:00
github-actions
166ad5e68d
updating DIRECTORY.md
2020-04-01 16:11:46 +00:00
Krishna Vedala
c751359c3f
Project Euler / Problem 19
2020-04-01 12:10:59 -04:00
Krishna Vedala
b20488c091
Project Euler - Problems 8-16
...
# 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.
2020-03-30 16:06:15 -04:00
github-actions
8db5a47bd0
updating DIRECTORY.md
2020-03-30 19:49:42 +00:00
Krishna Vedala
6ff4ac36d8
Merge branch 'project_euler/problem_16' into project_euler/master
...
# Conflicts:
# DIRECTORY.md
2020-03-30 15:49:17 -04:00
Krishna Vedala
772da4e1ac
Merge branch 'project_euler/problem_15' into project_euler/master
...
# Conflicts:
# DIRECTORY.md
2020-03-30 15:48:28 -04:00
Krishna Vedala
5e2dbc583b
Merge branch 'project_euler/problem_14' into project_euler/master
...
# Conflicts:
# DIRECTORY.md
2020-03-30 15:47:30 -04:00
Krishna Vedala
471d3a9247
Merge branch 'project_euler/problem_13' into project_euler/master
...
# Conflicts:
# DIRECTORY.md
2020-03-30 15:46:02 -04:00
github-actions
9f25309c90
updating DIRECTORY.md
2020-03-30 19:43:54 +00:00
Krishna Vedala
079938ea7c
algorithm from http://www.cplusplus.com/forum/beginner/68694/
2020-03-30 15:43:16 -04:00
github-actions
8d76566b2e
updating DIRECTORY.md
2020-03-30 18:50:59 +00:00
Krishna Vedala
1dc71abe93
combinatorial solution
2020-03-30 14:49:54 -04:00
Krishna Vedala
16cc1b71ff
added printf info
2020-03-30 11:42:49 -04:00
github-actions
46e4bf8e5d
updating DIRECTORY.md
2020-03-30 15:25:54 +00:00
Krishna Vedala
6bfc6b691a
optimized solution with option to compile using platform independent OpenMP parallelization.
2020-03-30 11:25:15 -04:00
github-actions
7d534ac8f9
updating DIRECTORY.md
2020-03-30 14:49:06 +00:00
Krishna Vedala
944fbbea7c
solution using arbitrary length decimal number addition using array allocation
2020-03-30 10:48:24 -04:00
Krishna Vedala
657c317957
added numbers as a text file
2020-03-30 09:25:07 -04:00
Krishna Vedala
c45653e074
Merge branch 'project_euler/problem_12' into project_euler/master
...
# Conflicts:
# DIRECTORY.md
2020-03-30 08:45:31 -04:00
Krishna Vedala
58d1d75958
added algorithm summary in comments
2020-03-30 08:42:43 -04:00
github-actions
f6536cc3be
updating DIRECTORY.md
2020-03-30 04:37:29 +00:00
Krishna Vedala
618614e5e1
Merge branch 'project_euler/problem_12' into project_euler/master
2020-03-30 00:36:47 -04:00
Krishna Vedala
51448a7399
Merge branch 'project_euler/problem_10' into project_euler/master
...
# Conflicts:
# DIRECTORY.md
2020-03-30 00:36:35 -04:00
Krishna Vedala
058da0b344
Merge branch 'project_euler/problem_09' into project_euler/master
...
* project_euler/problem_09:
updating DIRECTORY.md
optimized solution using only one loop copied from - https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol2.py
updating DIRECTORY.md
brute force method for Euler# 09
# Conflicts:
# DIRECTORY.md
2020-03-30 00:33:20 -04:00
Krishna Vedala
5d1ba02868
Merge branch 'project_euler/problem_08' into project_euler/master
2020-03-30 00:27:51 -04:00
github-actions
dc7cbdb768
updating DIRECTORY.md
2020-03-30 04:25:52 +00:00
Krishna Vedala
f6054c5d1c
algorithm implemented as presented in https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_12/sol2.py
2020-03-30 00:24:22 -04:00
github-actions
2a86cb9b95
updating DIRECTORY.md
2020-03-30 03:23:46 +00:00
Krishna Vedala
bba43f508e
ignore EXE files and vscode settings
2020-03-29 23:22:57 -04:00
Krishna Vedala
ad84e9b08d
fixed bug when n=5000
2020-03-29 23:20:41 -04:00
Krishna Vedala
feaf57d4a3
fixed error when n=5000
2020-03-29 23:13:01 -04:00
Krishna Vedala
747a50d3ca
Euler prob# 10 using sieve of Eratosthenes
2020-03-29 22:23:06 -04:00
Krishna Vedala
266383a700
add new-line to printf
2020-03-29 22:23:05 -04:00
Krishna Vedala
6e6e9e3d7e
brute force method to find primes and add them
2020-03-29 22:23:04 -04:00
github-actions
458404a6cb
updating DIRECTORY.md
2020-03-30 01:35:20 +00:00
Krishna Vedala
2ab1e5552d
Merge branch 'project_euler/problem_09' of github.com:kvedala/C into project_euler/problem_09
2020-03-29 21:34:51 -04:00
Krishna Vedala
51115bf0b9
optimized solution using only one loop
...
copied from - https://github.com/TheAlgorithms/Python/blob/master/project_euler/problem_09/sol2.py
2020-03-29 21:33:58 -04:00
github-actions
ebb887a253
updating DIRECTORY.md
2020-03-30 01:21:21 +00:00