Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6ac926f

Browse files
Update Readme.md
1 parent 6cd7966 commit 6ac926f

File tree

1 file changed

+6
-6
lines changed
  • Primality Testing/Sieve of Eratosthenes

1 file changed

+6
-6
lines changed

‎Primality Testing/Sieve of Eratosthenes/Readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ We start from 2, initially all numbers upto N unmarked.Then , if a number is unm
55

66
## Pseudo Code
77

8-
1. Take an array , arr[N] = {0} //All unmarked
8+
1. Take an array , arr[N] = {0} //All unmarked
99
2. Run Loop, for i from 2 to square_root(N) :
10-
3. if arr[i] equals 0 :
11-
4. Run Loop, for j from 2 to N :
12-
5. if i*j > N :
13-
6. ( Break this Loop )
14-
7. arr[i*j] = 1 // Every multiple is marked composite
10+
3. if arr[i] equals 0 :
11+
4. Run Loop, for j from 2 to N :
12+
5. if i*j > N :
13+
6. ( Break this Loop )
14+
7. arr[i*j] = 1 // Every multiple is marked composite
1515

1616
## Problems with this method
1717

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /