Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #3

Open
wants to merge 85 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
a17dbb2
test commit
yangyanghyunjung Oct 12, 2023
78c1188
과연 성공??
yangyanghyunjung Oct 12, 2023
524555b
커밋커밋
Oct 13, 2023
e3d672d
yangyanghunjung branch test
Oct 17, 2023
672b92c
yangyanghunjung branch test2
Oct 17, 2023
4ef0008
커밋커밋
Oct 13, 2023
8d804b2
과연 성공??
yangyanghyunjung Oct 12, 2023
0d8e1b8
과연 성공??
yangyanghyunjung Oct 12, 2023
ffd5ecb
yangyanghunjung branch test
Oct 17, 2023
02b926e
yangyanghunjung branch test2
Oct 17, 2023
b6220c5
커밋커밋
Oct 13, 2023
3478907
과연 성공??
yangyanghyunjung Oct 12, 2023
b14bde1
커밋커밋
Oct 13, 2023
8a647ce
Revert "커밋커밋"
Oct 13, 2023
21627d6
com 커밋 테스트
Oct 13, 2023
f0a51ca
onbarding_problem1 완성
Oct 13, 2023
21fb8f0
기능목록 작성
Oct 16, 2023
d035f7a
StringValidation 기능 commit
Oct 16, 2023
68b0610
FindAndRemoveDuplicate 기능 구현
Oct 16, 2023
d6e8ad2
FindAndRemoveDuplicate 중복값 삭제 기능
Oct 16, 2023
43f2cca
코드리뷰 2jun0's 중복값 제거 기능
Oct 16, 2023
2c3465e
Test code 추가
Oct 16, 2023
eb39b73
Problem2 Main함수
Oct 16, 2023
7e17955
충돌
Oct 16, 2023
4e2a942
FindAndRemoveDuplicate 충돌 해결
Oct 16, 2023
8f86a76
FindAndRemoveDuplicate 충돌 해결2
Oct 16, 2023
977291e
Test코드 충돌 해결2
Oct 16, 2023
fb60323
커밋커밋;;
Oct 13, 2023
28eade5
Revert "커밋커밋"
Oct 13, 2023
f896369
com 커밋 테스트
Oct 13, 2023
0fd7ded
Test code 추가
Oct 16, 2023
2bb13a8
충돌
Oct 16, 2023
6afafa4
FindAndRemoveDuplicate 충돌 해결
Oct 16, 2023
affbd19
FindAndRemoveDuplicate 충돌 해결2
Oct 16, 2023
09f419b
Test코드 충돌 해결2
Oct 16, 2023
57523cc
Merge branch 'yangyanghyunjung'
Oct 17, 2023
ed7da2a
main merge
Oct 17, 2023
35de17b
main merge
Oct 17, 2023
ff00a71
yangyanghyunjung에 기능3 목록 커밋
Oct 17, 2023
97f76ca
yangyanghyunjung에 기능3 목록 커밋2
Oct 17, 2023
7e7ad31
yangyanghyunjung에 기능3 목록 커밋3
Oct 17, 2023
323327a
problem3 기능목록 커밋
Oct 17, 2023
9e94115
problem3_ NumberValidation 기능 커밋
Oct 17, 2023
4a925c5
problem3_ ClapCount 기능 커밋
Oct 17, 2023
9e332cd
problem3_ Main함수 커밋
Oct 17, 2023
e0508aa
problem3_ TestCode 추가
Oct 17, 2023
a5bc7fe
problem3_ jiyeong's 코드리뷰
Oct 17, 2023
312ed9e
problem4 기능목록 커밋
yangyanghyunjung Oct 17, 2023
3007fd6
problem4_WordValidation 커밋
yangyanghyunjung Oct 17, 2023
feabc5f
problem4_ConvertWord 커밋
yangyanghyunjung Oct 17, 2023
a16eece
problem4_Main함수 커밋
yangyanghyunjung Oct 17, 2023
130fc53
problem4_Test Code 추가 커밋
yangyanghyunjung Oct 17, 2023
6429435
problem4_functionList.md 수정 (대문자 > 대문자로 수정)
yangyanghyunjung Oct 17, 2023
c45f7d0
yangyanghyunjung에 기능3 목록 커밋
Oct 17, 2023
df44936
yangyanghyunjung에 기능3 목록 커밋2
Oct 17, 2023
fbdcf89
yangyanghyunjung에 기능3 목록 커밋3
Oct 17, 2023
80c51e9
problem3 기능목록 커밋
Oct 17, 2023
f9628e5
problem3_ NumberValidation 기능 커밋
Oct 17, 2023
86ff47b
problem3_ ClapCount 기능 커밋
Oct 17, 2023
7b5bb9b
problem3_ Main함수 커밋
Oct 17, 2023
c755f13
problem3_ TestCode 추가
Oct 17, 2023
10c982c
problem3_ jiyeong's 코드리뷰
Oct 17, 2023
77b9660
problem4 기능목록 커밋
yangyanghyunjung Oct 17, 2023
635fffc
problem4_WordValidation 커밋
yangyanghyunjung Oct 17, 2023
196778e
problem4_ConvertWord 커밋
yangyanghyunjung Oct 17, 2023
1fa2768
problem4_Main함수 커밋
yangyanghyunjung Oct 17, 2023
7ed6048
problem4_Test Code 추가 커밋
yangyanghyunjung Oct 17, 2023
cf4fad2
problem4_functionList.md 수정 (대문자 > 대문자로 수정)
yangyanghyunjung Oct 17, 2023
c371219
잔디test용
yangyanghyunjung Oct 17, 2023
d9c4ade
problem4_com용 README commit
Oct 17, 2023
43e6b89
Merge remote-tracking branch 'origin/yangyanghyunjung' into yangyangh…
Oct 17, 2023
c1fe1e7
problem4_2jun0 코드리뷰
Oct 18, 2023
6e5b827
problem6_기능목록
Oct 18, 2023
108c249
problem6_ FindDuplicateNickname 기능
Oct 18, 2023
50aa7b4
problem6_ SortEmail 기능
Oct 18, 2023
71e10e5
problem6_ ValidationCheck
Oct 18, 2023
94884ad
problem6_ Main함수
Oct 18, 2023
9d2882f
problem6_ Test
Oct 18, 2023
8962f24
problem4_2jun0 코드리뷰
Oct 18, 2023
7566fb0
problem6_기능목록
Oct 18, 2023
6c16c1a
problem6_ FindDuplicateNickname 기능
Oct 18, 2023
f3174f9
problem6_ SortEmail 기능
Oct 18, 2023
fd26993
problem6_ ValidationCheck
Oct 18, 2023
38cf945
problem6_ Main함수
Oct 18, 2023
b54d18a
Merge remote-tracking branch 'origin/yangyanghyunjung' into yangyangh…
yangyanghyunjung Oct 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
problem6_ FindDuplicateNickname 기능
  • Loading branch information
yangyanghyunjung authored and yangyanghyunjung committed Oct 18, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 6c16c1a7bcbb8a388d3e84e7c1a2f3496da4a357
34 changes: 34 additions & 0 deletions src/main/java/problem6/FindDuplicateNickname.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package problem6;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class FindDuplicateNickname {
public List<String> FindDuplicateNickname (List<List<String>> forms) {
Set<String> nickNameSet = new HashSet<String>();
ValidationCheck validationCheck = new ValidationCheck();

for (int i = 0; i < forms.size(); ++i) {
String nickName = forms.get(i).get(1); // 닉네임
for (int j = 0; j < nickName.length() - 1; ++j) {
if (validationCheck.NicknameValidate(forms.get(j).get(1))) {
String substringNickName = ""; //마지막 OutOfBoundsException 방지
if (j == nickName.length() - 1) {
substringNickName = nickName.substring(j); //마지막 OutOfBoundsException 방지
} else {
substringNickName = nickName.substring(j, j + 2); // 2글자 추출
}
for (int z = i + 1; z < forms.size(); ++z) {
String email = forms.get(z).get(0);
if ( validationCheck.EmailValidate(email) && email.contains(substringNickName)) {
nickNameSet.add(email); // 이메일 추가
}
}
}
}
}
SortEmail sortEmail = new SortEmail();
return sortEmail.SortEmail(nickNameSet);
}
}