package ru.matevosyan.lesson_5_Array;

public class DeleteDuplicate{

	public String[] searchDuplicate (String mas[]) {

		int j = 0;		

		for (int k = mas.length-1; k > 0; k--) {
							
			for (int i = 0; i < mas.length - 1; i++) {
			
				if (mas[j].equals(mas[i+1])) {
				
					mas[i+1] = null;

					if (i == mas.length -1) {

						j += 1;

					}
							
				}
													
			}

		}

	return mas;

	}

}
@@ -117,21 +117,8 @@
 ) %7B%0A
-%0A%09%09int j = 0;
 %09%09%0A%0A
@@ -131,16 +131,23 @@
 (int k =
+ 0; k %3C
  mas.len
@@ -153,27 +153,22 @@
 ngth
--
+ - 
 1; k
- %3E 0; k--
+++
 ) %7B%0A
-%09
+%0A
 %09%09%09%09
@@ -186,17 +186,21 @@
 int i = 
-0
+k + 1
 ; i %3C ma
@@ -207,20 +207,16 @@
 s.length
- - 1
 ; i++) %7B
@@ -232,17 +232,17 @@
 if (mas%5B
-j
+k
 %5D.equals
@@ -247,18 +247,16 @@
 ls(mas%5Bi
-+1
 %5D)) %7B%0A%09%09
@@ -272,80 +272,20 @@
 as%5Bi
-+1
 %5D = 
+%22
 null
+%22
 ;%0A
-%0A%09%09%09%09%09if (i == mas.length -1) %7B%0A%0A%09%09%09%09%09%09j += 1;%0A%0A%09%09%09%09%09%7D%0A%09%09%09%09%09
 %09%09%0A%09
@@ -298,24 +298,25 @@
 %09%09%09%09%09%09%09%09%09%09%09%09
+%09
 %0A%09%09%09%7D%0A%0A%09%09%7D%0A%0A

add DeleteDuplicate.java