thulasi hace 6 años
padre
commit
5fd96b8b48

+ 1
- 1
.idea/compiler.xml Ver fichero

@@ -10,7 +10,7 @@
10 10
       </profile>
11 11
     </annotationProcessing>
12 12
     <bytecodeTargetLevel>
13
-      <module name="arraz" target="1.5" />
13
+      <module name="arraz" target="8" />
14 14
     </bytecodeTargetLevel>
15 15
   </component>
16 16
 </project>

+ 1
- 0
.idea/misc.xml Ver fichero

@@ -7,4 +7,5 @@
7 7
       </list>
8 8
     </option>
9 9
   </component>
10
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
10 11
 </project>

+ 427
- 226
.idea/workspace.xml Ver fichero

@@ -2,56 +2,95 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
5
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6
-      <change beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
5
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
7 12
     </list>
8 13
     <ignored path="$PROJECT_DIR$/arraz/target/" />
9 14
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10
-    <option name="TRACKING_ENABLED" value="true" />
11 15
     <option name="SHOW_DIALOG" value="false" />
12 16
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
13 17
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14 18
     <option name="LAST_RESOLUTION" value="IGNORE" />
15 19
   </component>
20
+  <component name="FUSProjectUsageTrigger">
21
+    <session id="458231039">
22
+      <usages-collector id="statistics.lifecycle.project">
23
+        <counts>
24
+          <entry key="project.closed" value="1" />
25
+          <entry key="project.open.time.15" value="1" />
26
+          <entry key="project.open.time.8" value="1" />
27
+          <entry key="project.opened" value="2" />
28
+        </counts>
29
+      </usages-collector>
30
+      <usages-collector id="statistics.file.extensions.edit">
31
+        <counts>
32
+          <entry key="java" value="3363" />
33
+        </counts>
34
+      </usages-collector>
35
+      <usages-collector id="statistics.file.types.edit">
36
+        <counts>
37
+          <entry key="JAVA" value="3363" />
38
+        </counts>
39
+      </usages-collector>
40
+      <usages-collector id="statistics.file.extensions.open">
41
+        <counts>
42
+          <entry key="java" value="2" />
43
+        </counts>
44
+      </usages-collector>
45
+      <usages-collector id="statistics.file.types.open">
46
+        <counts>
47
+          <entry key="JAVA" value="2" />
48
+        </counts>
49
+      </usages-collector>
50
+    </session>
51
+  </component>
16 52
   <component name="FileEditorManager">
17 53
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
18
-      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
54
+      <file pinned="false" current-in-tab="false">
19 55
         <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
20
-          <provider selected="true" editor-type-id="text-editor">
21
-            <state relative-caret-position="0">
22
-              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
23
-              <folding />
24
-            </state>
25
-          </provider>
56
+          <provider selected="true" editor-type-id="text-editor" />
26 57
         </entry>
27 58
       </file>
28
-      <file leaf-file-name="Arraz.java" pinned="false" current-in-tab="false">
59
+      <file pinned="false" current-in-tab="true">
29 60
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
30 61
           <provider selected="true" editor-type-id="text-editor">
31
-            <state relative-caret-position="0">
32
-              <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
33
-              <folding />
62
+            <state relative-caret-position="97">
63
+              <caret line="112" column="20" lean-forward="true" selection-start-line="112" selection-start-column="20" selection-end-line="112" selection-end-column="20" />
64
+              <folding>
65
+                <element signature="imports" expanded="true" />
66
+                <element signature="e#351#352#0" expanded="true" />
67
+                <element signature="e#385#386#0" expanded="true" />
68
+                <element signature="e#456#457#0" expanded="true" />
69
+                <element signature="e#497#498#0" expanded="true" />
70
+                <element signature="e#1551#1560#0" expanded="true" />
71
+              </folding>
34 72
             </state>
35 73
           </provider>
36 74
         </entry>
37 75
       </file>
38
-      <file leaf-file-name="ArrazTest.java" pinned="false" current-in-tab="false">
76
+      <file pinned="false" current-in-tab="false">
39 77
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
40 78
           <provider selected="true" editor-type-id="text-editor">
41
-            <state relative-caret-position="34">
42
-              <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
43
-              <folding />
79
+            <state relative-caret-position="181">
80
+              <caret line="282" column="25" selection-start-line="282" selection-start-column="25" selection-end-line="282" selection-end-column="25" />
81
+              <folding>
82
+                <element signature="imports" expanded="true" />
83
+              </folding>
44 84
             </state>
45 85
           </provider>
46 86
         </entry>
47 87
       </file>
48
-      <file leaf-file-name="README.md" pinned="false" current-in-tab="true">
88
+      <file pinned="false" current-in-tab="false">
49 89
         <entry file="file://$PROJECT_DIR$/README.md">
50 90
           <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
51
-            <state split_layout="SPLIT">
52
-              <first_editor relative-caret-position="306">
53
-                <caret line="18" column="0" lean-forward="true" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
54
-                <folding />
91
+            <state split_layout="SECOND">
92
+              <first_editor relative-caret-position="270">
93
+                <caret line="18" selection-start-line="18" selection-end-line="18" />
55 94
               </first_editor>
56 95
               <second_editor />
57 96
             </state>
@@ -63,8 +102,8 @@
63 102
   <component name="FileTemplateManagerImpl">
64 103
     <option name="RECENT_TEMPLATES">
65 104
       <list>
66
-        <option value="Class" />
67 105
         <option value="JUnit4 Test Class" />
106
+        <option value="Class" />
68 107
       </list>
69 108
     </option>
70 109
   </component>
@@ -72,9 +111,6 @@
72 111
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
73 112
   </component>
74 113
   <component name="GradleLocalSettings">
75
-    <option name="externalProjectsViewState">
76
-      <projects_view />
77
-    </option>
78 114
     <option name="projectSyncType">
79 115
       <map>
80 116
         <entry key="$USER_HOME$/GitHub/gs-gradle/initial" value="PREVIEW" />
@@ -84,8 +120,11 @@
84 120
   <component name="IdeDocumentHistory">
85 121
     <option name="CHANGED_PATHS">
86 122
       <list>
87
-        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
88 123
         <option value="$PROJECT_DIR$/README.md" />
124
+        <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
125
+        <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
126
+        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
127
+        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
89 128
       </list>
90 129
     </option>
91 130
   </component>
@@ -102,24 +141,97 @@
102 141
       </MavenImportingSettings>
103 142
     </option>
104 143
   </component>
105
-  <component name="ProjectFrameBounds">
106
-    <option name="x" value="242" />
107
-    <option name="y" value="45" />
108
-    <option name="width" value="1538" />
109
-    <option name="height" value="962" />
144
+  <component name="ProjectFrameBounds" extendedState="1">
145
+    <option name="y" value="23" />
146
+    <option name="width" value="1280" />
147
+    <option name="height" value="709" />
148
+  </component>
149
+  <component name="ProjectInspectionProfilesVisibleTreeState">
150
+    <entry key="Project Default">
151
+      <profile-state>
152
+        <expanded-state>
153
+          <State />
154
+          <State>
155
+            <id>Android</id>
156
+          </State>
157
+          <State>
158
+            <id>Code style issuesJava</id>
159
+          </State>
160
+          <State>
161
+            <id>Compiler issuesJava</id>
162
+          </State>
163
+          <State>
164
+            <id>CorrectnessLintAndroid</id>
165
+          </State>
166
+          <State>
167
+            <id>FinalizationJava</id>
168
+          </State>
169
+          <State>
170
+            <id>GeneralJavaScript</id>
171
+          </State>
172
+          <State>
173
+            <id>Inheritance issuesJava</id>
174
+          </State>
175
+          <State>
176
+            <id>J2ME issuesJava</id>
177
+          </State>
178
+          <State>
179
+            <id>JSP</id>
180
+          </State>
181
+          <State>
182
+            <id>Java</id>
183
+          </State>
184
+          <State>
185
+            <id>Java 5Java language level migration aidsJava</id>
186
+          </State>
187
+          <State>
188
+            <id>Java 9Java language level migration aidsJava</id>
189
+          </State>
190
+          <State>
191
+            <id>Java interop issuesKotlin</id>
192
+          </State>
193
+          <State>
194
+            <id>Java language level migration aidsJava</id>
195
+          </State>
196
+          <State>
197
+            <id>JavaBeans issuesJava</id>
198
+          </State>
199
+          <State>
200
+            <id>JavaScript</id>
201
+          </State>
202
+          <State>
203
+            <id>Kotlin</id>
204
+          </State>
205
+          <State>
206
+            <id>LintAndroid</id>
207
+          </State>
208
+          <State>
209
+            <id>Numeric issuesJava</id>
210
+          </State>
211
+          <State>
212
+            <id>PerformanceJava</id>
213
+          </State>
214
+          <State>
215
+            <id>Probable bugsJava</id>
216
+          </State>
217
+          <State>
218
+            <id>Probable bugsKotlin</id>
219
+          </State>
220
+          <State>
221
+            <id>SecurityJava</id>
222
+          </State>
223
+          <State>
224
+            <id>Serialization issuesJava</id>
225
+          </State>
226
+          <State>
227
+            <id>Verbose or redundant code constructsJava</id>
228
+          </State>
229
+        </expanded-state>
230
+      </profile-state>
231
+    </entry>
110 232
   </component>
111 233
   <component name="ProjectView">
112
-    <navigator currentView="ProjectPane" proportions="" version="1">
113
-      <flattenPackages />
114
-      <showMembers />
115
-      <showModules />
116
-      <showLibraryContents />
117
-      <hideEmptyPackages />
118
-      <abbreviatePackageNames />
119
-      <autoscrollToSource />
120
-      <autoscrollFromSource />
121
-      <sortByType />
122
-      <manualOrder />
234
+    <navigator proportions="" version="1">
123 235
       <foldersAlwaysOnTop value="true" />
124 236
     </navigator>
125 237
     <panes>
@@ -151,27 +263,37 @@
151 263
             <path>
152 264
               <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
153 265
               <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
266
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
267
+              <item name="src" type="462c0819:PsiDirectoryNode" />
268
+              <item name="main" type="462c0819:PsiDirectoryNode" />
269
+              <item name="java" type="462c0819:PsiDirectoryNode" />
270
+            </path>
271
+            <path>
272
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
273
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
154 274
               <item name="DocumentationOnArrays" type="462c0819:PsiDirectoryNode" />
155 275
             </path>
156 276
           </expand>
157 277
           <select />
158 278
         </subPane>
159 279
       </pane>
160
-      <pane id="Scratches" />
161
-      <pane id="PackagesPane" />
162
-      <pane id="AndroidView" />
163 280
       <pane id="Scope" />
281
+      <pane id="PackagesPane" />
164 282
     </panes>
165 283
   </component>
166 284
   <component name="PropertiesComponent">
167
-    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
168
-    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
285
+    <property name="GO_FMT" value="false" />
169 286
     <property name="WebServerToolWindowFactoryState" value="false" />
170 287
     <property name="aspect.path.notification.shown" value="true" />
171
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
172
-    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
288
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544101913454" />
173 289
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
174
-    <property name="GO_FMT" value="false" />
290
+    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
291
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
292
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
293
+    <property name="project.structure.last.edited" value="Project" />
294
+    <property name="project.structure.proportion" value="0.15" />
295
+    <property name="project.structure.side.proportion" value="0.2" />
296
+    <property name="settings.editor.selected.configurable" value="Errors" />
175 297
   </component>
176 298
   <component name="RecentsManager">
177 299
     <key name="CreateTestDialog.RecentsKey">
@@ -180,6 +302,9 @@
180 302
     <key name="CreateTestDialog.Recents.Supers">
181 303
       <recent name="" />
182 304
     </key>
305
+    <key name="CreateClassDialog.RecentsKey">
306
+      <recent name="" />
307
+    </key>
183 308
   </component>
184 309
   <component name="RunDashboard">
185 310
     <option name="ruleStates">
@@ -193,90 +318,85 @@
193 318
       </list>
194 319
     </option>
195 320
   </component>
196
-  <component name="RunManager">
321
+  <component name="RunManager" selected="JUnit.ArrazTest">
197 322
     <configuration default="true" type="Applet" factoryName="Applet">
198
-      <option name="WIDTH" value="400" />
199
-      <option name="HEIGHT" value="300" />
200 323
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
201
-      <module />
324
+      <method v="2">
325
+        <option name="Make" enabled="true" />
326
+      </method>
202 327
     </configuration>
203 328
     <configuration default="true" type="Application" factoryName="Application">
204
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
205
-      <option name="MAIN_CLASS_NAME" />
206
-      <option name="VM_PARAMETERS" />
207
-      <option name="PROGRAM_PARAMETERS" />
208 329
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
209
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
210
-      <option name="ALTERNATIVE_JRE_PATH" />
211
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
212
-      <option name="ENV_VARIABLES" />
213
-      <option name="PASS_PARENT_ENVS" value="true" />
214
-      <module name="" />
215
-      <envs />
330
+      <method v="2">
331
+        <option name="Make" enabled="true" />
332
+      </method>
216 333
     </configuration>
217
-    <configuration default="true" type="JUnit" factoryName="JUnit">
218
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
219
-      <module name="" />
220
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
221
-      <option name="ALTERNATIVE_JRE_PATH" />
222
-      <option name="PACKAGE_NAME" />
223
-      <option name="MAIN_CLASS_NAME" />
224
-      <option name="METHOD_NAME" />
225
-      <option name="TEST_OBJECT" value="class" />
226
-      <option name="VM_PARAMETERS" value="-ea" />
227
-      <option name="PARAMETERS" />
334
+    <configuration name="ArrazTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
335
+      <module name="arraz" />
336
+      <option name="PACKAGE_NAME" value="" />
337
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
338
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
339
+      <method v="2">
340
+        <option name="Make" enabled="true" />
341
+      </method>
342
+    </configuration>
343
+    <configuration name="ArrazTest.test1CopyArrayByInterator" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
344
+      <module name="arraz" />
345
+      <option name="PACKAGE_NAME" value="" />
346
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
347
+      <option name="METHOD_NAME" value="test1CopyArrayByInterator" />
348
+      <option name="TEST_OBJECT" value="method" />
349
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
350
+      <method v="2">
351
+        <option name="Make" enabled="true" />
352
+      </method>
353
+    </configuration>
354
+    <configuration name="ArrazTest.test2CopyArrayByInterator" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
355
+      <module name="arraz" />
356
+      <option name="PACKAGE_NAME" value="" />
357
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
358
+      <option name="METHOD_NAME" value="test2CopyArrayByInterator" />
359
+      <option name="TEST_OBJECT" value="method" />
228 360
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
229
-      <option name="ENV_VARIABLES" />
230
-      <option name="PASS_PARENT_ENVS" value="true" />
231
-      <option name="TEST_SEARCH_SCOPE">
232
-        <value defaultName="singleModule" />
233
-      </option>
234
-      <envs />
235
-      <patterns />
361
+      <method v="2">
362
+        <option name="Make" enabled="true" />
363
+      </method>
236 364
     </configuration>
237
-    <configuration default="true" type="Remote" factoryName="Remote">
238
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
239
-      <option name="SERVER_MODE" value="false" />
240
-      <option name="SHMEM_ADDRESS" value="javadebug" />
241
-      <option name="HOST" value="localhost" />
242
-      <option name="PORT" value="5005" />
365
+    <configuration default="true" type="JUnit" factoryName="JUnit">
366
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
367
+      <method v="2">
368
+        <option name="Make" enabled="true" />
369
+      </method>
243 370
     </configuration>
244 371
     <configuration default="true" type="TestNG" factoryName="TestNG">
245
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
246
-      <module name="" />
247
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
248
-      <option name="ALTERNATIVE_JRE_PATH" />
249
-      <option name="SUITE_NAME" />
250
-      <option name="PACKAGE_NAME" />
251
-      <option name="MAIN_CLASS_NAME" />
252
-      <option name="METHOD_NAME" />
253
-      <option name="GROUP_NAME" />
254
-      <option name="TEST_OBJECT" value="CLASS" />
255
-      <option name="VM_PARAMETERS" value="-ea" />
256
-      <option name="PARAMETERS" />
257 372
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
258
-      <option name="OUTPUT_DIRECTORY" />
259
-      <option name="ANNOTATION_TYPE" />
260
-      <option name="ENV_VARIABLES" />
261
-      <option name="PASS_PARENT_ENVS" value="true" />
262
-      <option name="TEST_SEARCH_SCOPE">
263
-        <value defaultName="singleModule" />
264
-      </option>
265
-      <option name="USE_DEFAULT_REPORTERS" value="false" />
266
-      <option name="PROPERTIES_FILE" />
267
-      <envs />
268 373
       <properties />
269 374
       <listeners />
375
+      <method v="2">
376
+        <option name="Make" enabled="true" />
377
+      </method>
270 378
     </configuration>
271 379
     <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
272 380
       <module name="" />
273 381
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
274 382
       <option name="PROGRAM_PARAMETERS" />
275 383
       <predefined_log_file id="idea.log" enabled="true" />
384
+      <method v="2">
385
+        <option name="Make" enabled="true" />
386
+      </method>
276 387
     </configuration>
277
-  </component>
278
-  <component name="ShelveChangesManager" show_recycled="false">
279
-    <option name="remove_strategy" value="false" />
388
+    <list>
389
+      <item itemvalue="JUnit.ArrazTest" />
390
+      <item itemvalue="JUnit.ArrazTest.test1CopyArrayByInterator" />
391
+      <item itemvalue="JUnit.ArrazTest.test2CopyArrayByInterator" />
392
+    </list>
393
+    <recent_temporary>
394
+      <list>
395
+        <item itemvalue="JUnit.ArrazTest" />
396
+        <item itemvalue="JUnit.ArrazTest.test2CopyArrayByInterator" />
397
+        <item itemvalue="JUnit.ArrazTest.test1CopyArrayByInterator" />
398
+      </list>
399
+    </recent_temporary>
280 400
   </component>
281 401
   <component name="SvnConfiguration">
282 402
     <configuration />
@@ -291,6 +411,8 @@
291 411
       <workItem from="1543955862749" duration="2347000" />
292 412
       <workItem from="1543958998826" duration="113000" />
293 413
       <workItem from="1544020724645" duration="762000" />
414
+      <workItem from="1544059628498" duration="1362000" />
415
+      <workItem from="1544064536860" duration="12053000" />
294 416
     </task>
295 417
     <task id="LOCAL-00001" summary="readme and docs">
296 418
       <created>1544021313039</created>
@@ -302,40 +424,104 @@
302 424
     <option name="localTasksCounter" value="2" />
303 425
     <servers />
304 426
   </component>
427
+  <component name="TestHistory">
428
+    <history-entry file="ArrazTest - 2018.12.06 at 07h 27m 20s.xml">
429
+      <configuration name="ArrazTest" configurationId="JUnit" />
430
+    </history-entry>
431
+    <history-entry file="ArrazTest - 2018.12.06 at 07h 37m 07s.xml">
432
+      <configuration name="ArrazTest" configurationId="JUnit" />
433
+    </history-entry>
434
+    <history-entry file="ArrazTest - 2018.12.06 at 07h 53m 14s.xml">
435
+      <configuration name="ArrazTest" configurationId="JUnit" />
436
+    </history-entry>
437
+    <history-entry file="ArrazTest - 2018.12.06 at 07h 53m 53s.xml">
438
+      <configuration name="ArrazTest" configurationId="JUnit" />
439
+    </history-entry>
440
+    <history-entry file="ArrazTest - 2018.12.06 at 07h 54m 44s.xml">
441
+      <configuration name="ArrazTest" configurationId="JUnit" />
442
+    </history-entry>
443
+    <history-entry file="ArrazTest - 2018.12.06 at 08h 06m 43s.xml">
444
+      <configuration name="ArrazTest" configurationId="JUnit" />
445
+    </history-entry>
446
+    <history-entry file="ArrazTest - 2018.12.06 at 08h 07m 08s.xml">
447
+      <configuration name="ArrazTest" configurationId="JUnit" />
448
+    </history-entry>
449
+    <history-entry file="ArrazTest - 2018.12.06 at 08h 09m 40s.xml">
450
+      <configuration name="ArrazTest" configurationId="JUnit" />
451
+    </history-entry>
452
+    <history-entry file="ArrazTest - 2018.12.06 at 08h 10m 34s.xml">
453
+      <configuration name="ArrazTest" configurationId="JUnit" />
454
+    </history-entry>
455
+    <history-entry file="ArrazTest - 2018.12.06 at 08h 11m 09s.xml">
456
+      <configuration name="ArrazTest" configurationId="JUnit" />
457
+    </history-entry>
458
+  </component>
305 459
   <component name="TimeTrackingManager">
306
-    <option name="totallyTimeSpent" value="3222000" />
460
+    <option name="totallyTimeSpent" value="16637000" />
307 461
   </component>
308 462
   <component name="ToolWindowManager">
309
-    <frame x="242" y="45" width="1538" height="962" extended-state="0" />
463
+    <frame x="0" y="23" width="1280" height="709" extended-state="1" />
310 464
     <editor active="true" />
311 465
     <layout>
312
-      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
313
-      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
314
-      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
315
-      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
316
-      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
317
-      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
318
-      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
319
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
320
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
321
-      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
322
-      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
323
-      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
324
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2577389" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
325
-      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
326
-      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
327
-      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
328
-      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
329
-      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
330
-      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
331
-      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
332
-      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
333
-      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
334
-      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
335
-      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
336
-      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
337
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
466
+      <window_info content_ui="combo" id="Project" order="0" weight="0.18659128" />
467
+      <window_info id="Structure" order="1" weight="0.24959612" />
468
+      <window_info id="Designer" order="2" />
469
+      <window_info id="Image Layers" order="3" />
470
+      <window_info id="Capture Tool" order="4" />
471
+      <window_info id="UI Designer" order="5" />
472
+      <window_info id="Favorites" order="6" side_tool="true" />
473
+      <window_info anchor="bottom" id="Messages" weight="0.32996634" />
474
+      <window_info anchor="bottom" id="Message" order="0" />
475
+      <window_info anchor="bottom" id="Find" order="1" />
476
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32996634" />
477
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
478
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
479
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
480
+      <window_info anchor="bottom" id="TODO" order="6" />
481
+      <window_info anchor="bottom" id="Terminal" order="7" />
482
+      <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
483
+      <window_info anchor="bottom" id="Version Control" order="9" />
484
+      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
485
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
486
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
487
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
488
+      <window_info anchor="right" id="Palette" order="3" />
489
+      <window_info anchor="right" id="Capture Analysis" order="4" />
490
+      <window_info anchor="right" id="Theme Preview" order="5" />
491
+      <window_info anchor="right" id="Database" order="6" />
492
+      <window_info anchor="right" id="Palette&#9;" order="7" />
493
+      <window_info anchor="right" id="Maven Projects" order="8" />
338 494
     </layout>
495
+    <layout-to-restore>
496
+      <window_info content_ui="combo" id="Project" order="0" weight="0.18659128" />
497
+      <window_info id="Structure" order="1" weight="0.24959612" />
498
+      <window_info id="Designer" order="2" />
499
+      <window_info id="Image Layers" order="3" />
500
+      <window_info id="Capture Tool" order="4" />
501
+      <window_info id="UI Designer" order="5" />
502
+      <window_info id="Favorites" order="6" side_tool="true" />
503
+      <window_info anchor="bottom" id="Messages" order="0" weight="0.32996634" />
504
+      <window_info anchor="bottom" id="Message" order="1" />
505
+      <window_info anchor="bottom" id="Find" order="2" />
506
+      <window_info active="true" anchor="bottom" id="Run" order="3" visible="true" weight="0.32996634" />
507
+      <window_info anchor="bottom" id="Debug" order="4" weight="0.4" />
508
+      <window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
509
+      <window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
510
+      <window_info anchor="bottom" id="TODO" order="7" />
511
+      <window_info anchor="bottom" id="Terminal" order="8" />
512
+      <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
513
+      <window_info anchor="bottom" id="Version Control" order="10" />
514
+      <window_info anchor="bottom" id="Database Changes" order="11" show_stripe_button="false" />
515
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
516
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
517
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
518
+      <window_info anchor="right" id="Palette" order="3" />
519
+      <window_info anchor="right" id="Capture Analysis" order="4" />
520
+      <window_info anchor="right" id="Theme Preview" order="5" />
521
+      <window_info anchor="right" id="Database" order="6" />
522
+      <window_info anchor="right" id="Palette&#9;" order="7" />
523
+      <window_info anchor="right" id="Maven Projects" order="8" />
524
+    </layout-to-restore>
339 525
   </component>
340 526
   <component name="TypeScriptGeneratedFilesManager">
341 527
     <option name="version" value="1" />
@@ -347,119 +533,122 @@
347 533
     <MESSAGE value="readme and docs" />
348 534
     <option name="LAST_COMMIT_MESSAGE" value="readme and docs" />
349 535
   </component>
350
-  <component name="XDebuggerManager">
351
-    <breakpoint-manager />
352
-    <watches-manager />
353
-  </component>
354 536
   <component name="editorHistoryManager">
355 537
     <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
356
-      <provider selected="true" editor-type-id="text-editor">
357
-        <state relative-caret-position="0">
358
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
359
-          <folding />
360
-        </state>
361
-      </provider>
538
+      <provider selected="true" editor-type-id="text-editor" />
362 539
     </entry>
363
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
540
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
364 541
       <provider selected="true" editor-type-id="text-editor">
365
-        <state relative-caret-position="0">
366
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
367
-          <folding />
542
+        <state relative-caret-position="225">
543
+          <caret line="15" column="23" selection-start-line="15" selection-start-column="23" selection-end-line="15" selection-end-column="23" />
368 544
         </state>
369 545
       </provider>
370 546
     </entry>
371
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
547
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
372 548
       <provider selected="true" editor-type-id="text-editor">
373
-        <state relative-caret-position="34">
374
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
375
-          <folding />
549
+        <state relative-caret-position="180">
550
+          <caret line="12" column="9" lean-forward="true" selection-start-line="12" selection-start-column="9" selection-end-line="12" selection-end-column="9" />
376 551
         </state>
377 552
       </provider>
378 553
     </entry>
379 554
     <entry file="file://$PROJECT_DIR$/README.md">
380 555
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
381
-        <state split_layout="SPLIT">
382
-          <first_editor relative-caret-position="1241">
383
-            <caret line="73" column="0" lean-forward="true" selection-start-line="73" selection-start-column="0" selection-end-line="73" selection-end-column="0" />
384
-            <folding />
556
+        <state split_layout="SECOND">
557
+          <first_editor relative-caret-position="270">
558
+            <caret line="18" selection-start-line="18" selection-end-line="18" />
385 559
           </first_editor>
386 560
           <second_editor />
387 561
         </state>
388 562
       </provider>
389 563
     </entry>
390
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
391
-      <provider selected="true" editor-type-id="text-editor">
392
-        <state relative-caret-position="0">
393
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
394
-          <folding />
395
-        </state>
396
-      </provider>
397
-    </entry>
398
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
399
-      <provider selected="true" editor-type-id="text-editor">
400
-        <state relative-caret-position="0">
401
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
402
-          <folding />
403
-        </state>
404
-      </provider>
405
-    </entry>
406 564
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
407 565
       <provider selected="true" editor-type-id="text-editor">
408
-        <state relative-caret-position="34">
409
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
410
-          <folding />
411
-        </state>
412
-      </provider>
413
-    </entry>
414
-    <entry file="file://$PROJECT_DIR$/README.md">
415
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
416
-        <state split_layout="SPLIT">
417
-          <first_editor relative-caret-position="1241">
418
-            <caret line="73" column="0" lean-forward="true" selection-start-line="73" selection-start-column="0" selection-end-line="73" selection-end-column="0" />
419
-            <folding />
420
-          </first_editor>
421
-          <second_editor />
422
-        </state>
423
-      </provider>
424
-    </entry>
425
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
426
-      <provider selected="true" editor-type-id="text-editor">
427
-        <state relative-caret-position="0">
428
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
429
-          <folding />
566
+        <state relative-caret-position="181">
567
+          <caret line="282" column="25" selection-start-line="282" selection-start-column="25" selection-end-line="282" selection-end-column="25" />
568
+          <folding>
569
+            <element signature="imports" expanded="true" />
570
+          </folding>
430 571
         </state>
431 572
       </provider>
432 573
     </entry>
433 574
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
434 575
       <provider selected="true" editor-type-id="text-editor">
435
-        <state relative-caret-position="0">
436
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
437
-          <folding />
438
-        </state>
439
-      </provider>
440
-    </entry>
441
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
442
-      <provider selected="true" editor-type-id="text-editor">
443
-        <state relative-caret-position="34">
444
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
445
-          <folding />
446
-        </state>
447
-      </provider>
448
-    </entry>
449
-    <entry file="file://$PROJECT_DIR$/README.md">
450
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
451
-        <state split_layout="SPLIT">
452
-          <first_editor relative-caret-position="306">
453
-            <caret line="18" column="0" lean-forward="true" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
454
-            <folding />
455
-          </first_editor>
456
-          <second_editor />
576
+        <state relative-caret-position="97">
577
+          <caret line="112" column="20" lean-forward="true" selection-start-line="112" selection-start-column="20" selection-end-line="112" selection-end-column="20" />
578
+          <folding>
579
+            <element signature="imports" expanded="true" />
580
+            <element signature="e#351#352#0" expanded="true" />
581
+            <element signature="e#385#386#0" expanded="true" />
582
+            <element signature="e#456#457#0" expanded="true" />
583
+            <element signature="e#497#498#0" expanded="true" />
584
+            <element signature="e#1551#1560#0" expanded="true" />
585
+          </folding>
457 586
         </state>
458 587
       </provider>
459 588
     </entry>
460 589
   </component>
461 590
   <component name="masterDetails">
462 591
     <states>
592
+      <state key="ArtifactsStructureConfigurable.UI">
593
+        <settings>
594
+          <artifact-editor />
595
+          <splitter-proportions>
596
+            <option name="proportions">
597
+              <list>
598
+                <option value="0.2" />
599
+              </list>
600
+            </option>
601
+          </splitter-proportions>
602
+        </settings>
603
+      </state>
604
+      <state key="FacetStructureConfigurable.UI">
605
+        <settings>
606
+          <last-edited>No facets are configured</last-edited>
607
+          <splitter-proportions>
608
+            <option name="proportions">
609
+              <list>
610
+                <option value="0.2" />
611
+              </list>
612
+            </option>
613
+          </splitter-proportions>
614
+        </settings>
615
+      </state>
616
+      <state key="GlobalLibrariesConfigurable.UI">
617
+        <settings>
618
+          <splitter-proportions>
619
+            <option name="proportions">
620
+              <list>
621
+                <option value="0.2" />
622
+              </list>
623
+            </option>
624
+          </splitter-proportions>
625
+        </settings>
626
+      </state>
627
+      <state key="JdkListConfigurable.UI">
628
+        <settings>
629
+          <last-edited>1.8</last-edited>
630
+          <splitter-proportions>
631
+            <option name="proportions">
632
+              <list>
633
+                <option value="0.2" />
634
+              </list>
635
+            </option>
636
+          </splitter-proportions>
637
+        </settings>
638
+      </state>
639
+      <state key="ModuleStructureConfigurable.UI">
640
+        <settings>
641
+          <last-edited>ArraysGoneWild</last-edited>
642
+          <splitter-proportions>
643
+            <option name="proportions">
644
+              <list>
645
+                <option value="0.2" />
646
+                <option value="0.6" />
647
+              </list>
648
+            </option>
649
+          </splitter-proportions>
650
+        </settings>
651
+      </state>
463 652
       <state key="ProjectJDKs.UI">
464 653
         <settings>
465 654
           <last-edited>1.8</last-edited>
@@ -472,6 +661,18 @@
472 661
           </splitter-proportions>
473 662
         </settings>
474 663
       </state>
664
+      <state key="ProjectLibrariesConfigurable.UI">
665
+        <settings>
666
+          <last-edited>Maven: junit:junit:4.0</last-edited>
667
+          <splitter-proportions>
668
+            <option name="proportions">
669
+              <list>
670
+                <option value="0.2" />
671
+              </list>
672
+            </option>
673
+          </splitter-proportions>
674
+        </settings>
675
+      </state>
475 676
     </states>
476 677
   </component>
477 678
 </project>

+ 155
- 0
arraz/src/main/java/Arraz.java Ver fichero

@@ -1,2 +1,157 @@
1
+import java.util.ArrayList;
2
+import java.util.Arrays;
3
+import java.util.Iterator;
4
+import java.util.List;
5
+
1 6
 public class Arraz {
7
+
8
+    public int sumOfArray(int[] arr) {
9
+        int sum = 0;
10
+        for(int n : arr)
11
+            sum += n;
12
+        return sum;
13
+    }
14
+
15
+
16
+    public double sumOfDoublesArray(double[] arr) {
17
+        double sum = 0;
18
+        for(double n : arr)
19
+            sum += n;
20
+        sum = Double.valueOf(String.format("%2f", sum));
21
+        return sum;
22
+    }
23
+
24
+    public int averageOfArray(int[] arr) {
25
+        return sumOfArray(arr)/arr.length;
26
+    }
27
+
28
+    public double doubleAverageOfArray(double[] arr) {
29
+        return sumOfDoublesArray(arr)/arr.length;
30
+    }
31
+
32
+    public boolean containsValue(int[] arr, int num) {
33
+        for(int n : arr){
34
+            if(n == num)
35
+                return true;
36
+        }
37
+        return false;
38
+    }
39
+
40
+    public int[] reverseArray(int[] arr) {
41
+        int[] revArr = new int[arr.length];
42
+        for(int i = 0; i < arr.length; i++){
43
+            revArr[i] = arr[arr.length-i-1];
44
+        }
45
+        return revArr;
46
+    }
47
+
48
+    public OddEven getOddEvensOfArray(int[] arr) {
49
+        OddEven oddEven = new OddEven();
50
+        oddEven.countOddsAndEvens(arr);
51
+        return oddEven;
52
+    }
53
+
54
+
55
+    public int FindIndexOf(int[] arr, int n) {
56
+        for(int i = 0; i<arr.length; i++) {
57
+            if (arr[i] == n)
58
+                return i;
59
+        }
60
+        return -1;
61
+    }
62
+
63
+    public int[] copyArrayByIterator(int[] arr) {
64
+        Integer[] newArray = new Integer[arr.length];
65
+        List<Integer> list = new ArrayList<Integer>();//adding array to the list
66
+        for(int n : arr)
67
+            list.add(n);
68
+        Iterator iterator = list.iterator();
69
+
70
+        int index = 0;
71
+        while(iterator.hasNext()){
72
+            newArray[index] = (Integer)iterator.next();
73
+            index++;
74
+        }
75
+        for(int i = 0;i<arr.length;i++){
76
+            arr[i] = newArray[i];
77
+        }
78
+        return arr;
79
+    }
80
+
81
+
82
+    public int[] copyArrayByLoop(int[] arr) {
83
+        int[] newArr = new int[arr.length];
84
+        for(int i=0;i<arr.length;i++){
85
+            newArr[i] = arr[i];
86
+        }
87
+        return newArr;
88
+    }
89
+
90
+    public int[] removeElementFromArray(int[] arr, int num) {
91
+        int[] newArr = new int[arr.length];
92
+        int index = 0;
93
+        for(int i = 0;i<arr.length; i++){
94
+            if(arr[i] != num)
95
+                newArr[index] = arr[i];
96
+            else
97
+                continue;
98
+            index++;
99
+        }
100
+        return newArr;
101
+    }
102
+
103
+    public int[] insertIntoArrayAt(int[] arr, int number, int i) {
104
+        int[] newArr = new int[arr.length + 1];
105
+        int index = 0;
106
+        for(int j =0; j< arr.length; j++){
107
+            if(j != i)
108
+                newArr[index] = arr[j];
109
+            else {
110
+                newArr[index] = number;
111
+                newArr[index + 1] = arr[j];
112
+            }
113
+            index++;
114
+        }
115
+        return newArr;
116
+    }
117
+
118
+    public MaxMin findMaxMin(int[] arr) {
119
+        MaxMin maxMin = new MaxMin();
120
+        maxMin.findMaxMin(arr);
121
+        return maxMin;
122
+    }
123
+
124
+    public int[] removeDupesFromArray(int[] arr) {
125
+        boolean duplicate = false;
126
+        int index = 0;
127
+        int[] newArr = new int[arr.length];
128
+        for(int i = 0;i<arr.length; i++){
129
+            for(int j = i+1; j <arr.length; j++){
130
+                if(arr[i] == arr[j])
131
+                    duplicate = true;
132
+            }
133
+            if(!duplicate) {
134
+                newArr[index] = arr[i];
135
+                index++;
136
+            }
137
+
138
+        }
139
+        return newArr;
140
+    }
141
+p
142
+
143
+    public int find2ndLargestValueFromArray(int[] arr) {
144
+        int max = Integer.MIN_VALUE;
145
+        int prev = max;
146
+        for(int n : arr){
147
+            if(n > max){
148
+                prev = max;
149
+                max = n;
150
+            }
151
+            if(n > prev && n!= max)
152
+                prev = n;
153
+        }
154
+
155
+        return prev;
156
+    }
2 157
 }

+ 15
- 0
arraz/src/main/java/MaxMin.java Ver fichero

@@ -0,0 +1,15 @@
1
+public class MaxMin {
2
+    int max;
3
+    int min;
4
+
5
+    public void findMaxMin(int[] arr) {
6
+        max = Integer.MIN_VALUE;
7
+        min = Integer.MAX_VALUE;
8
+        for(int n : arr){
9
+            if(n > max)
10
+                max = n;
11
+            if(n < min)
12
+                min = n;
13
+        }
14
+    }
15
+}

+ 19
- 0
arraz/src/main/java/OddEven.java Ver fichero

@@ -0,0 +1,19 @@
1
+public class OddEven {
2
+
3
+    public int odds;
4
+    public int evens;
5
+
6
+    public OddEven() {
7
+        odds = 0;
8
+        evens = 0;
9
+    }
10
+
11
+    public void countOddsAndEvens(int[] arr){
12
+        for(int n : arr){
13
+            if(n%2 == 0)
14
+                evens++;
15
+            else
16
+                odds++;
17
+        }
18
+    }
19
+}

+ 282
- 0
arraz/src/test/java/ArrazTest.java Ver fichero

@@ -1,5 +1,287 @@
1
+import junit.framework.Assert;
2
+import org.junit.Test;
3
+
1 4
 import static org.junit.Assert.*;
2 5
 
3 6
 public class ArrazTest {
4 7
 
8
+    Arraz arraz = new Arraz();
9
+
10
+    @Test
11
+    public void test1SumOfArray(){
12
+        int[] arr = new int[]{5,6};
13
+        int expected = 11;
14
+        int actual = arraz.sumOfArray(arr);
15
+        Assert.assertEquals(expected, actual);
16
+    }
17
+
18
+    @Test
19
+    public void test2SumOfArray(){
20
+        int[] arr = new int[]{0,3,6};
21
+        int expected = 9;
22
+        int actual = arraz.sumOfArray(arr);
23
+        Assert.assertEquals(expected, actual);
24
+    }
25
+
26
+    @Test
27
+    public void test1SumOfDoublesArray(){
28
+        double[] arr = new double[]{5.0,6.3};
29
+        double expected = 11.3;
30
+        double actual = arraz.sumOfDoublesArray(arr);
31
+        Assert.assertEquals(expected, actual);
32
+    }
33
+
34
+    @Test
35
+    public void test2SumOfDoublesArray(){
36
+        double[] arr = new double[]{8.3,6.3,0.5};
37
+        double expected = 15.1;
38
+        double actual = arraz.sumOfDoublesArray(arr);
39
+        Assert.assertEquals(expected, actual);
40
+    }
41
+
42
+    @Test
43
+    public void test1AverageOfArray(){
44
+        int[] arr = new int[]{6,6};
45
+        int expected = 6;
46
+        int actual = arraz.averageOfArray(arr);
47
+        Assert.assertEquals(expected, actual);
48
+    }
49
+
50
+    @Test
51
+    public void test2AverageOfArray(){
52
+        int[] arr = new int[]{3,3,6};
53
+        int expected = 4;
54
+        int actual = arraz.averageOfArray(arr);
55
+        Assert.assertEquals(expected, actual);
56
+    }
57
+
58
+    @Test
59
+    public void test1DoubleAverageOfArray(){
60
+        double[] arr = new double[]{6.0,6.0};
61
+        double expected = 6;
62
+        double actual = arraz.doubleAverageOfArray(arr);
63
+        Assert.assertEquals(expected, actual);
64
+    }
65
+
66
+    @Test
67
+    public void test2DoubleAverageOfArray(){
68
+        double[] arr = new double[]{3,3,6};
69
+        double expected = 4;
70
+        double actual = arraz.doubleAverageOfArray(arr);
71
+        Assert.assertEquals(expected, actual);
72
+    }
73
+
74
+    @Test
75
+    public void test1ContainsValue(){
76
+        int[] arr = new int[]{2,5,6};
77
+        int num = 5;
78
+        boolean expected = true;
79
+        boolean actual = arraz.containsValue(arr, num);
80
+        Assert.assertEquals(expected, actual);
81
+    }
82
+
83
+    @Test
84
+    public void test2ContainsValue(){
85
+        int[] arr = new int[]{8,5,9};
86
+        int num = 7;
87
+        boolean expected = false;
88
+        boolean actual = arraz.containsValue(arr, num);
89
+        Assert.assertEquals(expected, actual);
90
+    }
91
+
92
+    @Test
93
+    public void test1ReverseArray(){
94
+        int[] arr = new int[]{3,1,9};
95
+        int expected = 9;
96
+        int[] actual = arraz.reverseArray(arr);
97
+        Assert.assertEquals(expected, actual[0]);
98
+    }
99
+
100
+    @Test
101
+    public void test2ReverseArray(){
102
+        int[] arr = new int[]{6,11,9,7};
103
+        int expected = 7;
104
+        int[] actual = arraz.reverseArray(arr);
105
+        Assert.assertEquals(expected, actual[0]);
106
+    }
107
+
108
+    @Test
109
+    public void test1GetOddEvensOfArray(){
110
+        int[] arr = new int[]{3,2,9};
111
+        int expectedOdds = 2;
112
+        int expectedEvens = 1;
113
+        OddEven actual = arraz.getOddEvensOfArray(arr);
114
+        Assert.assertEquals(expectedOdds, actual.odds);
115
+        Assert.assertEquals(expectedEvens, actual.evens);
116
+    }
117
+
118
+    @Test
119
+    public void test2GetOddEvensOfArray(){
120
+        int[] arr = new int[]{6,11,4,7};
121
+        int expectedOdds = 2;
122
+        int expectedEvens = 2;
123
+        OddEven actual = arraz.getOddEvensOfArray(arr);
124
+        Assert.assertEquals(expectedOdds, actual.odds);
125
+        Assert.assertEquals(expectedEvens, actual.evens);
126
+    }
127
+
128
+    @Test
129
+    public void test1FindIndexOf(){
130
+        int[] arr = new int[]{8,3,2,6};
131
+        int expected = 1;
132
+        int actual = arraz.FindIndexOf(arr, 3);
133
+        org.junit.Assert.assertEquals(expected, actual);
134
+    }
135
+
136
+    @Test
137
+    public void test2FindIndexOf(){
138
+        int[] arr = new int[]{8,3, 11, 9,6};
139
+        int expected = -1;
140
+        int actual = arraz.FindIndexOf(arr, 2);
141
+        org.junit.Assert.assertEquals(expected, actual);
142
+    }
143
+
144
+    @Test
145
+    public void test1CopyArrayByInterator(){
146
+        int[] arr = new int[]{5,6};
147
+        int expected1 = 5;
148
+        int expected2 = 6;
149
+        int[] actual = arraz.copyArrayByIterator(arr);
150
+        Assert.assertEquals(expected1, actual[0]);
151
+        Assert.assertEquals(expected2, actual[1]);
152
+    }
153
+
154
+    @Test
155
+    public void test2CopyArrayByInterator(){
156
+        int[] arr = new int[]{0,3,6};
157
+        int expected1 = 0;
158
+        int expected2 = 3;
159
+        int expected3 = 6;
160
+        int[] actual = arraz.copyArrayByIterator(arr);
161
+        Assert.assertEquals(expected1, actual[0]);
162
+        Assert.assertEquals(expected2, actual[1]);
163
+        Assert.assertEquals(expected3, actual[2]);
164
+    }
165
+
166
+    @Test
167
+    public void test1CopyArrayByLoop(){
168
+        int[] arr = new int[]{8,10};
169
+        int expected1 = 8;
170
+        int expected2 = 10;
171
+        int[] actual = arraz.copyArrayByLoop(arr);
172
+        Assert.assertEquals(expected1, actual[0]);
173
+        Assert.assertEquals(expected2, actual[1]);
174
+    }
175
+
176
+    @Test
177
+    public void test2CopyArrayByLoop(){
178
+        int[] arr = new int[]{15,1,5};
179
+        int expected1 = 15;
180
+        int expected2 = 1;
181
+        int expected3 = 5;
182
+        int[] actual = arraz.copyArrayByLoop(arr);
183
+        Assert.assertEquals(expected1, actual[0]);
184
+        Assert.assertEquals(expected2, actual[1]);
185
+        Assert.assertEquals(expected3, actual[2]);
186
+    }
187
+
188
+    @Test
189
+    public void test1RemoveElementFromArray(){
190
+        int[] arr = new int[]{8,10};
191
+        int expected1 = 8;
192
+        int[] actual = arraz.removeElementFromArray(arr, 10);
193
+        Assert.assertEquals(expected1, actual[0]);
194
+    }
195
+
196
+    @Test
197
+    public void test2RemoveElementFromArray() {
198
+        int[] arr = new int[]{15, 1, 5};
199
+        int expected1 = 15;
200
+        int expected2 = 5;
201
+        int[] actual = arraz.removeElementFromArray(arr,1);
202
+        Assert.assertEquals(expected1, actual[0]);
203
+        Assert.assertEquals(expected2, actual[1]);
204
+    }
205
+    //  insertIntoArrayAt
206
+
207
+    @Test
208
+    public void test1InsertIntoArrayAt(){
209
+        int[] arr = new int[]{8,10};
210
+        int expected1 = 8;
211
+        int expected2 = 3;
212
+        int expected3 = 10;
213
+        int[] actual = arraz.insertIntoArrayAt(arr, 3, 1);
214
+        Assert.assertEquals(expected1, actual[0]);
215
+    }
216
+
217
+    @Test
218
+    public void test2InsertIntoArrayAt() {
219
+        int[] arr = new int[]{15, 1, 5};
220
+        int expected1 = 15;
221
+        int expected2 = 1;
222
+        int expected3 = 2;
223
+        int[] actual = arraz.insertIntoArrayAt(arr, 2, 2);
224
+        Assert.assertEquals(expected1, actual[0]);
225
+        Assert.assertEquals(expected2, actual[1]);
226
+        Assert.assertEquals(expected3, actual[2]);
227
+    }
228
+
229
+    @Test
230
+    public void test1FindMaxMin(){
231
+        int[] arr = new int[]{3,2,9};
232
+        int expectedMax = 9;
233
+        int expectedMin = 2;
234
+        MaxMin actual = arraz.findMaxMin(arr);
235
+        Assert.assertEquals(expectedMax, actual.max);
236
+        Assert.assertEquals(expectedMin, actual.min);
237
+    }
238
+
239
+    @Test
240
+    public void test2FindMaxMin(){
241
+        int[] arr = new int[]{10, 20, 30, 4, 7, 23};
242
+        int expectedMax = 30;
243
+        int expectedMin = 4;
244
+        MaxMin actual = arraz.findMaxMin(arr);
245
+        Assert.assertEquals(expectedMax, actual.max);
246
+        Assert.assertEquals(expectedMin, actual.min);
247
+    }
248
+
249
+    @Test
250
+    public void test1RemoveDupesFromArray(){
251
+        int[] arr = new int[]{1, 2, 3, 2, 1};
252
+        int[] expected = new int[]{1,2, 3};
253
+        int[] actual = arraz.removeDupesFromArray(arr);
254
+        for(int i : actual)
255
+            System.out.println(i);
256
+        Assert.assertEquals(expected[0], actual[0]);
257
+        Assert.assertEquals(expected[1], actual[1]);
258
+        Assert.assertEquals(expected[2], actual[2]);
259
+    }
260
+
261
+    @Test
262
+    public void test2RemoveDupesFromArray(){
263
+        int[] arr = new int[]{5, 7, 7};
264
+        int[] expected = new int[]{5, 7};
265
+        int[] actual = arraz.removeDupesFromArray(arr);
266
+        for(int i : actual)
267
+            System.out.println(i);
268
+        Assert.assertEquals(expected[0], actual[0]);
269
+        Assert.assertEquals(expected[1], actual[1]);
270
+    }
271
+
272
+    @Test
273
+    public void test1Find2ndLargestValueFromArray(){
274
+        int[] arr = new int[]{5,3,1,8};
275
+        int expected = 5;
276
+        int actual = arraz.find2ndLargestValueFromArray(arr);
277
+        Assert.assertEquals(expected, actual);
278
+    }
279
+
280
+    @Test
281
+    public void test2Find2ndLargestValueFromArray(){
282
+        int[] arr = new int[]{25,8,11,20};
283
+        int expected = 20;
284
+        int actual = arraz.find2ndLargestValueFromArray(arr);
285
+        Assert.assertEquals(expected, actual);
286
+    }
5 287
 }