일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- 배열
- Data Science
- Deep Learning
- 문자열
- predictive analysis
- array
- OOP
- const
- pass by reference
- 알고리즘
- Object Oriented Programming
- raw data
- Python
- 백준
- function
- 오블완
- vscode
- C++
- 포인터
- string
- programming
- pointer
- 반복문
- 티스토리챌린지
- Pre-processing
- assignment operator
- baekjoon
- 파이썬
- 함수
- Class
- Today
- Total
목록python (16)
Channi Studies

https://leetcode.com/problems/maximal-square/description/ 이 문제를 풀기 위해서 nested for loop을 사용했습니다.Input n x m 에 맞춰 각 반복문에서 현재 위치 기준으로 좌단, 상단, 좌상단 index를 모두 확인하여 그 중 최솟값에 + 1을 하는 전략을 취했습니다. 만약 현재 인덱스가 0이라면 해당 위치에서 구성할 수 있는 최대 사각형의 넓이 또한 0이므로, 즉시 다음 반복문으로 넘어갑니다. 매 반복문의 마지막에 max_num을 업데이트 해주면서, 최종적으로 길이의 제곱을 반환해 넓이 값을 리턴합니다. def maximalSquare(self, matrix: List[List[str]]) -> int: n = len(matrix) ..
An iterable is an object, obj, that produces an iterator via the syntax iter(obj).An iterator is an object that manages the iteration of a series of values. If variable it identifies an iterator object, then each call to the built-in function, next(it), produces a subsequent element from the underlying series, with a StopIteration exception raised to indicate that there are no further elements. ..

Python provides various bitwise operators that allow for convenient manipulation of the individual bits of a binary representation of an integer. For example, the integer 23 is represented in binary with rightmost bits 00010111 and the integer 13 is represented in binary with rightmost bits 00001101. The bitwise and operation, 23 & 13, produces integer 5, which has bit 1 in each position for whi..

Files and Exceptions To access a file, you must first open itOpen a file for reading (“r”) Open a file for writing (“w”) - If the output file already exists, it is emptied before the new data is written into it. - If the file does not exist, an empty file is created. To write in the file, - You MUST explicitly write the newline character (\n) to start a new line. - You can also write formatte..