강의

멘토링

커뮤니티

Inflearn Community Q&A

skaksdmlvn0484's profile image
skaksdmlvn0484

asked

Algorithm Course for Smart Programming

The concept of recursion and basic examples 3

binary search에서 질문

Written on

·

318

0

1. 왜 갑자기 매개변수로 int[] 가 아니라 String[]을 쓴 이유가 있을까요?

2. 왜

int compResult = target.compareTo(items[middle]);

은 되고

int compResult = items[middle].compareTo(target);

은 안될까요?

algorithm

Answer 1

0

보통 검색하면 정보가 String이 저장되어있는 경우가 많기 때문이 아닐까요???

skaksdmlvn0484's profile image
skaksdmlvn0484

asked

Ask a question