The thief has found himself a new place for his thievery again. There is only one entrance to this area, called root.
Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that all houses in this place form a binary tree. It will automatically contact the police if two directly-linked houses were broken into on the same night.
Given the root of the binary tree, return the maximum amount of money the thief can rob without alerting the police.
CHAR는 고정 사이즈이다.
남는 공간은 공백으로 채우게 된다.
공백 채움 비교(blank-padded comparison semantics)를 사용한다.
예를 들어 CHAR(10) 인 데
‘test’라는 4자짜리 문자열을 insert 하게 되면
남는 공간은 6개의 공백으로 채우게 된다.
따라서 무조건 처음 선언된 10byte가 소요된다.
물론 값을 받아 올 때 이 공백은 자동으로 제거된다.
공백까지 읽고 싶다면 PAD_CHAR_TO_FULL_LENGTH 모드를 활성화하면 공백까지 다 읽어온다.
if ( 저장할 데이터 길이 < 선언된 컬럼 길이 )
-> 남는 공간은 스페이스로 채워지므로 공간의 낭비가 발생한다.
따라서 반드시 고정길이에 해당하는 데이터만 CHAR로 선언하는 것이 좋다.
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Given a characters array tasks, representing the tasks a CPU needs to do, where each letter represents a different task. Tasks could be done in any order. Each task is done in one unit of time. For each unit of time, the CPU could complete either one task or just be idle.
However, there is a non-negative integer n that represents the cooldown period between two same tasks (the same letter in the array), that is that there must be at least n units of time between any two same tasks.
Return the least number of units of times that the CPU will take to finish all the given tasks.