๐ STUDY/JAVA
์ฌ๊ท
์ฌ๊ท (Recurssion) ํจ์ ๋ด๋ถ์์ ์ง์ ํน์ ๊ฐ์ ์ ์ผ๋ก ์๊ธฐ ์์ ์ ํธ์ถ Base Part : ์ฌ๊ท๋ฅผ ๋๋๋ ์กฐ๊ฑด์ ์ง๋ ํํธ Inductive Par : ์๊ธฐ ์์ ์ ํธ์ถํ๋ ํํธ ์ฌ๊ท์ ํธ์ถ์ ํ๋ก๊ทธ๋จ ๋ฉ๋ชจ๋ฆฌ ๊ตฌ์กฐ์์ ์คํ์ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์, ๋ฐ๋ณต์ ์ธ ํธ์ถ์ ๋ฉ๋ชจ๋ฆฌ ๋ฐ ์๋์ ์ฑ๋ฅ ์ ํ๋ฅผ ์ผ๊ธฐํ๋ค. ์์ ํฉํ ๋ฆฌ์ผ int factorial(int n){ if (n==1 || 0) return 1; else return n*factorial(n-1); } Permutation public class PermutationTest { static int N =3, R =4; static int[] numbers; static int[] input; static boolean[] isSelected;..
2022. 5. 18.