선행 스킬이란 어떤 스킬을 배우기 전에 먼저 배워야 하는 스킬을 뜻합니다.
예를 들어 선행 스킬 순서가 스파크 → 라이트닝 볼트 → 썬더일때, 썬더를 배우려면 먼저 라이트닝 볼트를 배워야 하고, 라이트닝 볼트를 배우려면 먼저 스파크를 배워야 합니다.
위 순서에 없는 다른 스킬(힐링 등)은 순서에 상관없이 배울 수 있습니다. 따라서 스파크 → 힐링 → 라이트닝 볼트 → 썬더와 같은 스킬트리는 가능하지만, 썬더 → 스파크나 라이트닝 볼트 → 스파크 → 힐링 → 썬더와 같은 스킬트리는 불가능합니다.
선행 스킬 순서 skill과 유저들이 만든 스킬트리1를 담은 배열 skill_trees가 매개변수로 주어질 때, 가능한 스킬트리 개수를 return 하는 solution 함수를 작성해주세요.
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of the line i is at (i, ai) and (i, 0). Find two lines, which, together with the x-axis forms a container, such that the container contains the most water.
Notice that you may not slant the container.
Given a nested list of integers, implement an iterator to flatten it.
Each element is either an integer, or a list -- whose elements may also be integers or other lists.
검색하면 많은 Paging Query가 나온다.
그런데 내 입맛에 맞는 Query가 없었다.
예제용 Query가 아닌
실무에서 사용할 수 있는 Query를 원했다.
그래서 누군가에게 도움이 되고
내가 나중에 사용할 필요가 있을 시 사용하기 위해서 정리해놓는다.
Oracle과 MySQL 2가지 버전으로 알아보자.
1페이지에 20개의 데이터를 보여준다.
조회하고 싶은 페이지 클릭 시
해당 페이지에서 노출되어야 할 데이터를 노출한다.
count : 1페이지에 노출할 데이터의 양
ex) count = 30이라면 1페이지에 30개의 데이터를 보여준다.
startNum : 조회하려는 페이지의 번호
ex) 3이라면 3페이지를 보려는 것이다.