본문 바로가기
728x90

binary search4

[LeetCode | Java | Binary Search 문제 풀이] 1351. Count Negative Numbers in a Sorted Matrix - Solution with Loop 99 Club 2기 | Java | Beginner📉 1351. Count Negative Numbers in a Sorted Matrix🏷 관련 주제 : Array Binary Search Matrix Algorithm ComplexityEasyGiven a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise, return the number of negative numbers in grid.Example 1:Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]]Output: 8Explanation: There are 8 negative.. 2024. 6. 12.
[99클럽] 99클럽 코테 스터디 22일차 TIL + Array, Binary Search 👈  이전글[99클럽] 99클럽 코테 스터디 21일차 TIL + 동적 계획법99Club 2기 | Java | Beginner🗝 오늘의 학습 키워드 : Array Binary Search📚 공부한 내용 본인의 언어로 정리하기[LeetCode | Java | Binary Search  문제 풀이] 35. Search Insert Position - Solution with Loop ⌛ 오늘의 회고오늘은 예전에 풀었던 문제를 잘못 올려주셔서코딩테스트 문제를 2번 풀었다.앞에 문제가 뭔가 익숙한 느낌으로 쉽다더라니...😉2번째 문제도 어렵지는 않아서 금새 풀었는데풀이 쓸 때, 경우의 수를 생각하는 것을 글로 표현하려고 하니그 부분이 조금 어려워서 시간이 걸렸던 것 같다.오늘은 집 근처 카페에서 TIL 작.. 2024. 6. 10.
[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.
728x90