From 4a25131a11d219edd983cdff8b46824c0d9ad717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C5=9F=C4=B1nsu=20Ar=C4=B1c=C4=B1?= Date: Thu, 27 Jan 2022 23:16:20 +0300 Subject: [PATCH] 1431 --- E_1431_KidsWiththeGreatestNumberofCandies.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 E_1431_KidsWiththeGreatestNumberofCandies.java diff --git a/E_1431_KidsWiththeGreatestNumberofCandies.java b/E_1431_KidsWiththeGreatestNumberofCandies.java new file mode 100644 index 0000000..b6dcb62 --- /dev/null +++ b/E_1431_KidsWiththeGreatestNumberofCandies.java @@ -0,0 +1,17 @@ +public class Solution { + public List kidsWithCandies(int[] candies, int extraCandies) { + List donen = new ArrayList<>(); + int max=0; + for(int i=0;imax) + max=candies[i]; + } + for(int i=0;i=max) + donen.add(true); + else + donen.add(false); + } + return donen; + } +} \ No newline at end of file