728x90
728x90
[Java] 2140. Solving Questions With Brainpower - LeetCode Daily Challenge
코딩테스트/leetcode2023. 5. 12. 14:32[Java] 2140. Solving Questions With Brainpower - LeetCode Daily Challenge

Solving Questions With Brainpower - LeetCode Can you solve this real interview question? Solving Questions With Brainpower - You are given a 0-indexed 2D integer array questions where questions[i] = [pointsi, brainpoweri]. The array describes the questions of an exam, where you have to process the qu leetcode.com 풀이 DFS를 이용해서, 해당 칸을 탐색할 수 있을 경우 탐색해서 모든 경우의수를 구한다음 최대값을 구하는 단순 DFS문제라고 생각했다. class ..

[Java] 59.Spiral Matrix II - LeetCode Daily Challenge
코딩테스트/leetcode2023. 5. 10. 21:15[Java] 59.Spiral Matrix II - LeetCode Daily Challenge

https://leetcode.com/problems/spiral-matrix-ii/ Spiral Matrix II - LeetCode Can you solve this real interview question? Spiral Matrix II - Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiraln.jpg] Input: n = 3 O leetcode.com 풀이 방향에 대한 변수와, 한 칸씩 체크해줄 변수를 지정해 준 뒤, 카운팅만 잘 해주면 되는 문제였..

[Java] 54. Spiral Matrix - LeetCode daily challenge
코딩테스트/leetcode2023. 5. 9. 19:09[Java] 54. Spiral Matrix - LeetCode daily challenge

https://leetcode.com/problems/spiral-matrix/ Spiral Matrix - LeetCodeCan you solve this real interview question? Spiral Matrix - Given an m x n matrix, return all elements of the matrix in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiral1.jpg] Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Outpuleetcode.com 첫번째풀이두통이 조금 심한 날이라 깊게 생각하기 싫었다. 처음 생각난게 DFS, 두번째로 생각난건 while문으로..

728x90
728x90
image