Commit Graph

758 Commits

Author SHA1 Message Date
Krishna Vedala
def308b785
remove conio.h 2020-04-06 23:59:19 -04:00
Krishna Vedala
45398453be
First working cmake 2020-04-06 23:50:46 -04:00
Krishna Vedala
772dd98aa6
do not track build folder 2020-04-06 22:38:33 -04:00
Krishna Vedala
d321ee09cc
updated submodule 2020-04-06 22:22:54 -04:00
Krishna Vedala
c511a709cc
added submodule kvedala/function_primer 2020-04-06 22:19:41 -04:00
Krishna Vedala
855c9124b8
added stdint.h for integer length typedefs 2020-04-03 08:10:28 -04:00
github-actions
b12e387bce updating DIRECTORY.md 2020-04-03 03:51:13 +00:00
Krishna Vedala
daca8c97e2
brute-force method 2020-04-02 23:50:51 -04:00
github-actions
74dfd1fffd updating DIRECTORY.md 2020-04-03 00:17:42 +00:00
Krishna Vedala
22bb478c07
Merge branch 'project_euler/master2'
* project_euler/master2: (26 commits)
  solution using arbitrary number of digits took 11ms
  algorithm by Dijkstra
  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
  added source text file
  updating DIRECTORY.md
  sort using both lazy sort and shell-sort
  add stats for algo 2 and use milliseconds
  create a duplicate array
  added new shell-sort algorithm
  updating DIRECTORY.md
  speed optimized solution + optional OpenMP
  added computational time
  added additional summary
  updating DIRECTORY.md
  ...
2020-04-02 20:16:57 -04:00
github-actions
e496cf68df updating DIRECTORY.md 2020-04-03 00:16:37 +00:00
Krishna Vedala
1914f98fcd
Merge branch 'project_euler/problem_25' into project_euler/master2
* project_euler/problem_25:
  solution using arbitrary number of digits took 11ms
2020-04-02 20:15:57 -04:00
Krishna Vedala
3032428b65
Merge branch 'project_euler/problem_24' into project_euler/master2
* project_euler/problem_24:
  algorithm by Dijkstra
2020-04-02 20:15:48 -04:00
Krishna Vedala
52b83e3ca6
Merge branch 'project_euler/problem_23' into project_euler/master2
* 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
2020-04-02 20:15:39 -04:00
Krishna Vedala
c0eaae7546
Merge branch 'project_euler/problem_22' into project_euler/master2
* project_euler/problem_22:
  added source text file
  updating DIRECTORY.md
  sort using both lazy sort and shell-sort

# Conflicts:
#	DIRECTORY.md
2020-04-02 20:13:14 -04:00
Krishna Vedala
5d6f7b3876
Merge branch 'sorting/shell_sort' into project_euler/master2
* 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
2020-04-02 20:10:50 -04:00
Krishna Vedala
3077a981dd
Merge branch 'project_euler/problem_21' into project_euler/master2
* project_euler/problem_21:
  updating DIRECTORY.md
  speed optimized solution + optional OpenMP

# Conflicts:
#	DIRECTORY.md
2020-04-02 20:10:30 -04:00
Krishna Vedala
feec93558c
Merge branch 'project_euler/problem_19' into project_euler/master2
* project_euler/problem_19:
  updating DIRECTORY.md
  Project Euler / Problem 19

# Conflicts:
#	DIRECTORY.md
2020-04-02 20:08:51 -04:00
Krishna Vedala
8279092455
solution using arbitrary number of digits
took 11ms

(cherry picked from commit 54e3cdc92f81bebe8678257916766b5b8af9b2b0)
2020-04-02 20:02:22 -04:00
Krishna Vedala
b033b323fb
much faster Fibbonacci algorithm 2020-04-02 18:36:11 -04:00
Krishna Vedala
eecdadecd4
algorithm by Dijkstra 2020-04-02 18:23:12 -04:00
github-actions
64fe9b0718 updating DIRECTORY.md 2020-04-02 17:27:59 +00:00
Krishna Vedala
fa24b792a7
move time computation inside loop + comments 2020-04-02 13:26:54 -04:00
Krishna Vedala
3598708121
faster parallleization 2020-04-02 13:25:26 -04:00
Krishna Vedala
ba31018aef
time computation inside the loop & print loop info 2020-04-02 13:23:51 -04:00
Krishna Vedala
f34164e601
added comments 2020-04-02 13:15:25 -04:00
Krishna Vedala
50a113addb
sol1 optimized by storing abundant numbers in a condensed array 2020-04-02 12:28:04 -04:00
Krishna Vedala
baaec2a3e0
brute-force - compute abundant numbers every time 2020-04-02 12:27:23 -04:00
Krishna Vedala
1d780f1a2f
added source text file 2020-04-02 01:14:31 -04:00
github-actions
5d5f2d4912
updating DIRECTORY.md
(cherry picked from commit be4c47c1d95e79cac5cffb16f032895cf14ed45c)
2020-04-01 23:54:45 -04:00
Krishna Vedala
a617fb71e5
sort using both lazy sort and shell-sort
(cherry picked from commit 0cbea99c3e77736b571ef7702a7f6a3ce6a031be)
2020-04-01 23:54:35 -04:00
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