Skip to content

Conversation

@randomkj
Copy link
Owner

@randomkj randomkj commented Mar 9, 2023

No description provided.

@randomkj
Copy link
Owner Author

randomkj commented Mar 9, 2023

첫번째 코멘트

@randomkj
Copy link
Owner Author

randomkj commented Mar 9, 2023

from random import randint
import time

배열에 10,000개의 정수를 삽입

array = []
for _ in range(10000):
array.append(randint(1, 100)) # 1부터 100 사이의 랜덤한 정수

선택 정렬 프로그램 성능 측정

start_time = time.time()

선택 정렬 프로그램 소스코드

for i in range(len(array)):
min_index = i # 가장 작은 원소의 인덱스
for j in range(i + 1, len(array)):
if array[min_index] > array[j]:
min_index = j
array[i], array[min_index] = array[min_index], array[i] # 스와프

end_time = time.time() # 측정 종료
print("선택 정렬 성능 측정:", end_time - start_time) # 수행 시간 출력

배열을 다시 무작위 데이터로 초기화

array = []
for _ in range(10000):
array.append(randint(1, 100)) # 1부터 100 사이의 랜덤한 정수

기본 정렬 라이브러리 성능 측정

start_time = time.time()

기본 정렬 라이브러리 사용

array.sort()

end_time = time.time() # 측정 종료
print("기본 정렬 라이브러리 성능 측정:", end_time - start_time) # 수행 시간 출력

@fustat21
Copy link
Collaborator

fustat21 commented Mar 9, 2023

fustat2.1의 코멘트

@@ -17,8 +17,8 @@ public static void main(String[] args) {
// 이진 탐색을 위해 정렬 수행
Collections.sort(arr);

    int start = 1; // 가능한 최소 거리 차이(min gap)
    int end = arr.get(n - 1) - arr.get(0); // 가능한 최대 거리 차이(max gap)
    int start = 1; // 가능한 최소 거리(min gap)
    int end = arr.get(n - 1) - arr.get(0); // 가능한 최대 거리(max gap)
    int result = 0;

    while (start <= end) {

start_time = time.time()

# 선택 정렬 프로그램 소스코드
for i in range(len(array)):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기에 코드 코멘트


# 배열을 다시 무작위 데이터로 초기화
array = []
for _ in range(10000):
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기는 두번째 내 코멘트

fustat21 and others added 4 commits March 9, 2023 14:55
네용 쓰는 듯한 방식입니다.
내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요. 여기까지 두줄 엔터입니다.
내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.내용을 쓰는 것 같은데 어라마나 길게 써질지 모르렜어요.
21 0421 업로드
21 0421 업로드
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants