Please contact me if you have any questions

- Elena.Kim -

홈으로
[PostgreSQL] Table Lock 종류와 호환성

Table Lock 멀티 트랜잭션 환경에서 데이터베이스의 일관성과 무결성을 유지하기 위해서 트랜잭션의 순차적 진행을 보장할 수 있어야 한다. 이를 위해 Lock 기술이 등장했다. Shared Lock(또는 Read Lock) 원하는 데이터에 Lock을 걸었지만 다른 세션에서 읽을 수 있다. Shared Lock은 허용되지만, Exclusive Lock은 불가능하다. 데이터를 다른 사용자가 동시 읽기만 가능하되 변경은 불가능하...

[Hacker Rank] Modified Kaprekar Numbers

Modified Kaprekar Numbers | Easy A modified Kaprekar number is a positive whole number with a special property. If you square it, then split the number into two integers and sum those integers, you have the same value you started with. Consider a...

[Hacker Rank] Extra Long Factorials

Extra Long Factorials | Medium The factorial of the integer n, written n!, is defined as: n! = n X (n - 1) X (n - 2) X … X 3 X 2 X 1 Calculate and print the factorial of a given integer. For example, if n = 30, we calculate 30 X 29 X 28 X ...

[Hacker Rank] Equalize the Array

Equalize the Array | Easy Karl has an array of integers. He wants to reduce the array until all remaining elements are equal. Determine the minimum number of elements to delete to reach his goal. For example, if his array is arr = [1, 2, 2, 3], ...

[Javascript] Prototype 객체

자바스크립트는 함수형 프로그래밍 언어? 어느 날, 이 아무개 친구가 나에게 물었다. “Javascript는 함수형 프로그래밍 언어잖아, 다른 객체지향 프로그래밍 언어와 비교해서 말해줄 수 있어?” 그 질문을 듣고 나는 Javascript가 함수형 프로그래밍 언어라고 생각하면서 사용한 적이 없는데 왜 저런 질문을 할까?라는 생각이 들었다. 사실 나는 함수형 프로그래밍 언어에 대해 잘 모른다. 그런데 어떻게 Javascript는 함수형 프로...

[Hacker Rank] The Bomberman Game

The Bomberman Game | Medium Bomberman lives in a rectangular grid. Each cell in the grid either contains a bomb or nothing at all. Each bomb can be planted in any cell of the grid but once planted, it will detonate after exactly 3 seconds. Once ...

[Redis] INCR 명령어와 INCRBYFLOAT 명령어

INCR 숫자를 1씩 증가시킨다. 데이터베이스에 KEY가 없을 경우, KEY를 SET하고 0을 기준으로 1을 더한다. 단, VALUE가 레디스의 가장 큰 야의 정수 범위(2^63 − 1)를 초과했을 경우 에러가 발생한다. > SET count 0 OK > INCR count 1 > INCR count 2 > GET count "2" > DEL count 1 > INCR count 1 >...

[Redis] In-Memory 데이터베이스

인-메모리 데이터베이스 인-메모리 데이터베이스는 NoSQL 방식에 속하며, 데이터 스토리지가 메인 메모리에 설치되어 운영되는 방식의 데이터베이스 시스템이다. 디스크(전통) 데이터베이스 VS 인-메모리 데이터베이스 디스크 데이터베이스 데이터 스토리지가 디스크이다. 디스크에 저장된 데이터를 대상으로 쿼리를 수행한다. 디스크에 저장된 블록의 내용을 메인 메모리상으로 버퍼링하여 디스크 입출력(횟수)을 줄임으로써 빠른 데이터 관...

[Hacker Rank] Taum And B'day

Taum And B’day | Easy Taum is planning to celebrate the birthday of his friend, Diksha. There are two types of gifts that Diksha wants from Taum: one is black and the other is white. To make her happy, Taum has to buy b black gifts and w white gi...

[Hacker Rank] Kangaroo

Kangaroo | Easy You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at locatio...