Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].
The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer.
You must write an algorithm that runs in O(n) time and without using the division operation.
You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
Given a string s, return the number of palindromic substrings in it.
A string is a palindrome when it reads the same backward as forward.
A substring is a contiguous sequence of characters within the string.
Given the root of a binary search tree, and an integer k, return the kth (1-indexed) smallest element in the tree.
Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.
Java에서 클래스 변수 혹은 인스턴스 변수를 초기화하는 방법은 다양하다.
그 중 Static Initializer Block와 Instance Initializer Block의 동작 순서를 코드로 알아보자.