Programming/Python

    [DS] Heap

    1. What is Heap? A binary heap is a heap, a tree which obeys the property that the root of any tree is greater than or eqaul to all its children. The primary use of usch a data structure is to implement a priorty queue. heap[k]

    [DS] Queue

    1. What is Priority Queue ? A priority queue is a special type of queue in which each element is associated with a priority value. And, elements are served on the basis of their priority. Generally, the value of the element itself is considered for assigning the priority. For example, the element with the highest value is considered the highest priority element. 2. Inplementation of Priority Que..

    [Error] Error and Exception

    1. Kinds of Error KeyError : 주로 딕셔너리 자료형에서 발생하는 에러이다. 없는 Key값에 접근하려고 할 때 발생하게 된다. 이때 dict.get() 메소드를 사용할 수 있다. ValueError : 부적절한 값을 가진 인자를 받았을 때 발생하는 에러이다. 예를들어 int함수 안에는 int("10")과 같이 숫자로 변경할 수 있는 문자열이 와야 하는데, 숫자로 변경할 수 없는 문자열이 오는 것처럼 부적절한 인자가 올 때 발생한다. 또한 리스트 자료형에서 없는 인덱스 값에 접근하려고 할 때 발생한다. Syntax error : 모든 프로그래밍언어는 고유한 문법을 가지고 있다. 이 문법을 위배해서 프로그래밍 하게되면 문법 에러(syntax error) 를 출력한다. Name error ..

    [BeautifulTable] Print list object in table format

    [BeautifulTable] Print list object in table format

    1. What is beautifultable? This package provides BeautifulTable class for easily printing tabular data in a visually appealing format to a termina. Features included but not limited to : Full customization of the look and feel of the table Build the Table as you wish, By adding rows, or by columns or even mixing both these approaches. Full support for colors using ANSI sequences or any library o..