Skip to content

Commit b2f3c4f

Browse files
authored
The Journey of A Homo programmer
1 parent baefb38 commit b2f3c4f

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

README.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Write a program that tells if an integer is prime or not.
1010
## The Journey:
1111

1212
### 01. [Base Programmer](01.BaseProgrammer.c)
13-
Though you knew how prime number worked, it took a long time to come up with this logic. Also, You made several mistakes on the way. And now, you are proud of your brilliant solution.
13+
Though you knew how prime numbers work, it took a long time to come up with this logic. Also, You made several mistakes on the way. But now, you are proud of your brilliant solution.
1414

1515
``` BaseProgrammer.c
1616
int func(int a)
@@ -33,7 +33,7 @@ else
3333
```
3434
3535
### 02. [Programmer Kaioken x4](02.ProgrammerKaioken4.c)
36-
You have learned to use flag, and think that- it is the coolest. Also, indentation is super important!
36+
You have learned to use flags, and think that they are the coolest. Also, indentation is super important!
3737
3838
``` ProgrammerKaioken4.c
3939
int pri_num(int a) {
@@ -47,7 +47,7 @@ int pri_num(int a) {
4747
```
4848

4949
### 03. [Programmer Kaioken x10](03.ProgrammerKaioken10.c)
50-
You don't need to calculate all the way to the end, finding one divisor is enough. So, just `return`, no need for 'flag'. `break` would do too, but `return` is better.
50+
You don't need to calculate all the way to the end; finding one divisor is enough. So, just `return`; no need for 'flag'. `break` would do too, but `return` is better.
5151

5252
``` ProgrammerKaioken10.c
5353
int prime_num(int x){
@@ -64,7 +64,7 @@ int prime_num(int x){
6464
```
6565
6666
### 04. [Programmer Kaioken x20](04.ProgrammerKaioken20.c)
67-
You have grown SMARTER, and halved the run time by checking divisibility with odd-numbers only. You also understand that looping till 'x/2' is enough.
67+
You have grown SMARTER and have halved the run time by checking divisibility with odd-numbers only. You also understand that looping till 'x/2' is enough.
6868
6969
``` ProgrammerKaioken20.c
7070
int prime_or_not(int x) {
@@ -116,7 +116,7 @@ int prime_check(int n){
116116
```
117117
118118
### 06. [Pseudo Super Programmer](06.PseudoSuperProgrammer.cpp)
119-
Now, you understand- **mere comment cannot make bad code look good**. So, you get rid of those crappy names plus annoying comments, and make the code truly readable.
119+
Now, you understand- **mere comment cannot make bad code look good**. So, you get rid of those crappy names and annoying comments. And now, the code is truly readable.
120120
121121
``` PseudoSuperProgrammer.cpp
122122
bool primeNumberChecker(int number){
@@ -141,8 +141,9 @@ bool primeNumberChecker(int number){
141141
```
142142

143143
### 07. [Super Programmer](07.SuperProgrammer.cpp)
144-
You have improved time complexity from 'n' to '√n'! BRILLIANT!!! You covered boundary cases too. No room for unreliable codes :) <br>
145-
*Most importantly, who elite uses tab?!*
144+
You have improved time complexity from 'n' to '√n'! BRILLIANT!!! <br>
145+
You covered boundary cases too: no room for unreliable codes :) <br>
146+
*Most importantly, who elite uses the tab?!*
146147

147148
``` SuperProgrammer.cpp
148149
#include <math.h>
@@ -170,8 +171,8 @@ bool checkPrime(int number) {
170171
```
171172
172173
### 08. [Super Programmer 2](08.SuperProgrammer2.cpp)
173-
You have come up with a more clever solution for computing '√n'. In fact, you don't really need to calculate it. <br>
174-
`2 == number` instead of `number == 2` can save you from lots of trouble caused by mistyping one `=`; giving compilation error in place of undetectable bug.
174+
You have come up with a more clever solution for computing '√n'. In fact, you don't really need to calculate it! <br>
175+
`2 == number`, instead of `number == 2`, can save you from lots of troubles caused by mistyping one `=` by giving a compilation error in place of an undetectable bug.
175176
176177
``` SuperProgrammer2.cpp
177178
bool isPrime (int number) {
@@ -193,7 +194,7 @@ bool isPrime (int number) {
193194
```
194195

195196
### 09. [Super Programmer 3](09.SuperProgrammer3.cpp)
196-
As we don't need to check divisibility by all even numbers after checking by 2, the same goes for 3. So, now we are checking divisibility by only the odd numbers those are not multiple of 3.
197+
As we don't need to check divisibility by all even numbers after checking by 2, the same goes for 3. So now, we are checking divisibility by only the odd numbers that are not multiples of 3.
197198

198199
``` SuperProgrammer3.cpp
199200
bool isPrime (int number) {
@@ -235,7 +236,7 @@ bool isPrime(int N, int _=2){
235236
```
236237

237238
### 11. [Super Programmer 4](11.SuperProgrammer4.java)
238-
u don't give a **f\*$%**
239+
u don't give a duck
239240

240241
``` PrimeNumberChecker.java
241242
public class PrimeNumberChecker {
@@ -246,7 +247,7 @@ public class PrimeNumberChecker {
246247
```
247248

248249
### 12. [Super Programmer God](12.SuperProgrammerGod.java)
249-
Execution time is more important than memory consumption. And if you can do some preprocessing then you should. Thus, for smaller integers you have reduced the complexity from √n to 1.
250+
Execution time is more important than memory consumption. And if you can do some preprocessing, then you should. Thus for smaller integers, you have reduced the complexity from √n to 1.
250251

251252
``` PrimeNumberChecker.java
252253
public class PrimeNumberChecker {

0 commit comments

Comments
 (0)