CS50 is Harvard University's introduction to the intellectual enterprises of computer science and the art of programming for majors and non-majors alike.
My CS50 Problem Sets Solutions | 2021
-
Determine how long it takes for a population to reach a particular size.
https://gist.github.com/aryan1107/a93ae9bd762b8d087185e924c2066161
Usage Example:
$ ./population
Start size: 100
End size: 200
Years: 9
-
Change Owned program using the Greedy algorithm.
https://gist.github.com/aryan1107/e43aff48323baa1ed8498879b3f07a16
Usage Example:
$ ./cash
Change owed: 0.41
4
-
Creating pyramids like Mario world.
https://gist.github.com/aryan1107/796f785daed4863b568fef0d252d6531
Usage Example:
$ ./mario
Height: 4
# #
## ##
### ###
#### ####
-
Determine which of two Scrabble words is worth more.
https://gist.github.com/aryan1107/1582af05578359632403e644e44eb22c
Usage Example:
$ ./scrabble
Player 1: COMPUTER
Player 2: science
Player 1 wins!
-
Implement a program that encrypts messages using Caesar’s cipher, usage example below.
https://gist.github.com/aryan1107/3b207617ea26e68d9c5249eafd912507
Usage Example:
$ ./caesar 13
plaintext: HELLO
ciphertext: URYYB
-
Implement a program that runs a plurality election, per the example below..
https://gist.github.com/aryan1107/4c912548a52408566ae99f7ed3b3e826
Usage Example:
$ ./plurality Alice Bob
Number of voters: 3
Vote: Alice
Vote: Bob
Vote: Alice
Alice
-
Implement a program that runs a runoff election,per the example below..
https://gist.github.com/aryan1107/63992326f2d763e54527d1cb1baee122
Usage Example:
./runoff Alice Bob Charlie
Number of voters: 5
Rank 1: Alice
Rank 2: Charlie
Rank 3: Bob
Rank 1: Alice
Rank 2: Charlie
Rank 3: Bob
Rank 1: Bob
Rank 2: Charlie
Rank 3: Alice
Rank 1: Bob
Rank 2: Charlie
Rank 3: Alice
Rank 1: Charlie
Rank 2: Alice
Rank 3: Bob
Alice
-
A program to modify the volume of an audio file., per the example below..
https://gist.github.com/aryan1107/960dcccd0e4a631747381f95133ebe7c
Usage Example:
$ ./volume input.wav output.wav 2.0
-
Implement a program that applies filters to BMPs, per the example below.
https://gist.github.com/aryan1107/2ae6a535d068f07a3f7d91125e63f661
Usage Example: Using -r to reflect, -g for greyscale & -b for blur
$ ./filter -r image.bmp reflected.bmp
-
Implement a program that recovers JPEGs from a forensic image, per the example below.
https://gist.github.com/aryan1107/a550c54be3dcafc12476c75be4f2019b
Usage Example:
$ ./recover card.raw
-
Implement a program that identifies a person based on their DNA, per the example below..
https://gist.github.com/aryan1107/e1e48bb48db4f2649c6844d98b66b91c
Usage Example:
$ python dna.py databases/large.csv sequences/5.txt
Lavender