Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
PP - HW1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
moataz.dbaneh
PP - HW1
Commits
bd03036c
Commit
bd03036c
authored
Mar 21, 2023
by
MoutazDebbaneh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add upper bound for rand. Edit README.md
parent
b508e72a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
workspace.xml
.idea/workspace.xml
+13
-8
README.md
README.md
+7
-1
ArrayOccurrencesCountTest.java
src/test/java/ArrayOccurrencesCountTest.java
+1
-1
No files found.
.idea/workspace.xml
View file @
bd03036c
...
...
@@ -4,13 +4,10 @@
<option
name=
"autoReloadType"
value=
"SELECTIVE"
/>
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"39d1573e-bc8d-4759-8e1b-31b85df143ea"
name=
"Changes"
comment=
"Initial commit"
>
<change
afterPath=
"$PROJECT_DIR$/README.md"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/main/java/org/example/ArrayOccurrencesCount.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/test/java/ArrayOccurrencesCountTest.java"
afterDir=
"false"
/>
<list
default=
"true"
id=
"39d1573e-bc8d-4759-8e1b-31b85df143ea"
name=
"Changes"
comment=
"Add first question solution"
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
pom.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/pom.xml
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/
main/java/org/example/Main.java"
before
Dir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/
README.md"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/README.md
"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/
test/java/ArrayOccurrencesCountTest.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/test/java/ArrayOccurrencesCountTest.java"
after
Dir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
...
@@ -124,7 +121,14 @@
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1679400277116
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"2"
/>
<task
id=
"LOCAL-00002"
summary=
"Add first question solution"
>
<created>
1679408135254
</created>
<option
name=
"number"
value=
"00002"
/>
<option
name=
"presentableId"
value=
"LOCAL-00002"
/>
<option
name=
"project"
value=
"LOCAL"
/>
<updated>
1679408135254
</updated>
</task>
<option
name=
"localTasksCounter"
value=
"3"
/>
<servers
/>
</component>
<component
name=
"Vcs.Log.Tabs.Properties"
>
...
...
@@ -140,6 +144,7 @@
</component>
<component
name=
"VcsManagerConfiguration"
>
<MESSAGE
value=
"Initial commit"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"Initial commit"
/>
<MESSAGE
value=
"Add first question solution"
/>
<option
name=
"LAST_COMMIT_MESSAGE"
value=
"Add first question solution"
/>
</component>
</project>
\ No newline at end of file
README.md
View file @
bd03036c
# Parallel Programming HW1
> Important Note: Please make sure to change JVM memory heap settings to enable making an array of a billion elements
\ No newline at end of file
> Important Note: Please make sure to change JVM memory heap settings to enable making an array of a billion elements
### Notes regarding some questions:
<br
/>
#### 1. Question One:
-
Function intStream() was used for testing instead of randomArray() because its answer is expected, and therefore the comparison is easier
\ No newline at end of file
src/test/java/ArrayOccurrencesCountTest.java
View file @
bd03036c
...
...
@@ -10,7 +10,7 @@ public class ArrayOccurrencesCountTest extends TestCase {
Random
rand
=
new
Random
();
int
[]
arr
=
new
int
[
size
];
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
arr
[
i
]
=
rand
.
nextInt
(
size
);
arr
[
i
]
=
rand
.
nextInt
(
100000
);
}
return
arr
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment