본문 바로가기
728x90

Array9

[LeetCode | Java | Array, String 문제 풀이] 1773. Count Items Matching a Rule - Solution with Loop 99 Club 2기 | Java | Beginner🚩 1773. Count Items Matching a Rule🏷 관련 주제 : Array StringEasy You are given an array items, where each items[i] = [$type_{i},\ color_{i},\ name_{i}$] describes the type, color, and name of the $i^{th}$ item. You are also given a rule represented by two strings, ruleKey and ruleValue.The $i^{th}$ item is said to match the rule if one of the following is true:ruleKey.. 2024. 6. 17.
[LeetCode | Java | Array, String 문제 풀이] 2942. Find Words Containing Character - Solution with cotains() 99 Club 2기 | Java | Beginner🈶 2942. Find Words Containing Character🏷 관련 주제 : Array String contains()EasyYou are given a 0-indexed array of strings words and a character x.Return an array of indices representing the words that contain the character x.Note that the returned array may be in any order.Example 1:Input: words = ["leet","code"], x = "e"Output: [0,1]Explanation: "e" occurs in both wor.. 2024. 6. 16.
[LeetCode | Java | 주제 문제 풀이] 1512. Number of Good Pairs - Solution with 1)HashMap 2)Array 3)Stream API 99 Club 2기 | Java | Beginner1512. Number of Good Pairs🏷 관련 주제 : Array Hash Table Math CountingEasyGiven an array of integers nums, return the number of good pairs.A pair (i, j) is called good if nums[i] == nums[j] and i j.Example 1:Input: nums = [1,2,3,1,1,3]Output: 4Explanation: There are 4 good pairs (0,3), (0,4), (3,4), (2,5) 0-indexed.Example 2:Input: nums = [1,1,1,1]Output: 6Explanation: E.. 2024. 6. 15.
[99클럽] 99클럽 코테 스터디 26일차 TIL + Array 👈  이전글[99클럽] 99클럽 코테 스터디 25일차 TIL + Array, Greedy, Sorting99Club 2기 | Java | Beginner🗝 오늘의 학습 키워드 : Array📚 공부한 내용 본인의 언어로 정리하기[LeetCode | Java | Array 문제 풀이] 1470. Shuffle the Array - Solution with Array & index⌛ 오늘의 회고오늘은 Array 관련 문제가 나왔다.미들러, 챌린저 문제도 풀어보고 싶은데오전에 국민취업지원제도 상담도 다녀오고내일배움캠프 코드카타문제를 푸느라 99클럽 문제는 많이 풀지 못했다.일단 TIL 먼저 쓰고 마음 수련 다녀와서 남는 시간 동안 미들러, 챌린저 문제도 도전해 봐야겠다.💥 오늘 만난 문제 & 나의 시도 .. 2024. 6. 14.
[LeetCode | Java | Array 문제 풀이] 1470. Shuffle the Array - Solution with Array & index 99 Club 2기 | Java | Beginner1470. Shuffle the Array🏷 관련 주제 : ArrayEasyGiven the array nums consisting of 2n elements in the form [x1,x2,...,xn,y1,y2,...,yn].Return the array in the form [x1,y1,x2,y2,...,xn,yn].Example 1:Input: nums = [2,5,1,3,4,7], n = 3Output: [2,3,5,4,1,7]Explanation: Since x1=2, x2=5, x3=1, y1=3, y2=4, y3=7 then the answer is [2,3,5,4,1,7].Example 2:Input: nums = [1,2,3,4,4,.. 2024. 6. 14.
[LeetCode | Java | Greedy 문제 풀이] 2037. Minimum Number of Moves to Seat Everyone - Solution with Arrays.sort() 99 Club 2기 | Java | Beginner🪑 2037. Minimum Number of Moves to Seat Everyone🏷 관련 주제 : Array Greedy SortingEasyThere are n seats and n students in a room. You are given an array seats of length n, where seats[i] is the position of the $i^{th}$ seat. You are also given the array students of length n, where students[j] is the position of the $j^{th}$ student.You may perform the following move any.. 2024. 6. 13.
[LeetCode | Java | Binary Search 문제 풀이] 35. Search Insert Position - Solution with Binary Search 99 Club 2기 | Java | Beginner📥 35. Search Insert Position🏷 관련 주제 : Array Binary SearchEasyGiven a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You must write an algorithm with O(log n) runtime complexity.Example 1:Input: nums = [1,3,5,6], target = 5Output: 2Example 2:Input: .. 2024. 6. 10.
[LeetCode | Java | Binary Search 문제 풀이] 2824.Count Pairs Whose Sum is Less than Target - Solution with Binary Search 99클럽 2기 | 자바 | 비기너2824.Count Pairs Whose Sum is Less than Target🏷 Topic : Array Two Pointers Binary Search SortingEasyGiven a 0-indexed integer array nums of length n and an integer target, return the number of pairs (i, j) where 0 and nums[i] + nums[j] .Example 1:Input: nums = [-1,1,2,3,1], target = 2Output: 3Explanation: There are 3 pairs of indices that satisfy the conditions in the stateme.. 2024. 6. 7.
[LeetCode | Java | Binary Search 문제 풀이] 2824. Count Pairs Whose Sum is Less than Target - Solution with 이중for문 99클럽 | Java | 비기너2824.Count Pairs Whose Sum is Less than Target🏷 Topic : Array Two Pointers Binary Search SortingEasyGiven a 0-indexed integer array nums of length n and an integer target, return the number of pairs (i, j) where 0 and nums[i] + nums[j] .Example 1: Input: nums = [-1,1,2,3,1], target = 2 Output: 3 Explanation: There are 3 pairs of indices that satisfy the conditions in th.. 2024. 5. 27.
728x90


Top