- Today
- Total
- BFS
- MST
- CS
- ๊ทธ๋ฆฌ๋
- ์๋ฃ๊ตฌ์กฐ
- ์๋ฐ์์ ์
- ์์์ ๋ ฌ
- pytorch
- leetcode
- database
- ์ธํด
- ๊ตฌํ
- spring
- array
- ์กธ์ ์ํ
- ํ๋ก๊ทธ๋๋จธ์ค
- ์๋ฐ
- java
- PS
- Graph
- tree
- ๋ฒจ๋งํฌ๋
- ๋ฐฑ์ค
- Algorithm
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- ๋ค์ต์คํธ๋ผ
- ๋ฐฑ์๋
- ๋ฌธ๋ฒ
- OOP
- dp
๋ชฉ๋ก๐ฅ Algorithm || ๋ฌธ์ ํ์ด/PS (109)
Partially Committed
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/Cakep/btrOqTR3QQR/CRqzJublhseAlsHFCeXAGK/img.png)
TITLE : 1822. Sign of the Product of an Array Description : There is a function signFunc(x) that returns: 1 if x is positive. -1 if x is negative. 0 if x is equal to 0. You are given an integer array nums. Let product be the product of all values in the array nums. Return signFunc(product). Example 1: Input: nums = [-1,-2,-3,-4,3,2,1] Output: 1 Explanation: The product of all values in the array..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dxFyg4/btrOdhHpF76/YCEKrqZQZcKJuQQqJiXgeK/img.png)
TITLE : 1779.Find Nearest Point That Has the Same X or Y Coordinate Description : You are given two integers,xandy, which represent your current location on a Cartesian grid:(x, y). You are also given an arraypointswhere eachpoints[i] = [ai, bi]represents that a point exists at(ai, bi). A point isvalidif it shares the same x-coordinate or the same y-coordinate as your location. Return the index ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/xq6hF/btrN66rOxR7/xDIjPoPF6qvIGnGd0Cb121/img.png)
TITLE : 1281. Subtract the Product and Sum of Digits of an Integer Description : Given an integer number n, return the difference between the product of its digits and the sum of its digits. ๊ฐ ์๋ฆฟ์๋ค์ ๊ณฑ๊ณผ ๊ฐ ์๋ฆฟ์๋ค์ ํฉ์ ์ฐจ์ด๋ฅผ ๋ฐํํ๋ ๋ฉ์๋๋ฅผ ๊ตฌํํ๋ฉด๋๋ค . [C++] class Solution { public: int subtractProductAndSum(int n) { int pod = 1; int sod = 0; int t = 0; string temp = to_string(n); vector v; for (char ele : temp)..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cXb0LK/btrN9kiJRjz/XuDiXL0nusK9Va7H6FuIFk/img.png)
TITLE : 191.Number of 1 Bits Description : Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight). 2์ง์๋ก ๋ํ๋์ ๋, 1 ์ ๊ฐ์๋ฅผ ์ธ์ด์ฃผ๋ฉด ๋๋ค. uint32_t n ์ ์ ๋ ฅ๋ฐ์ผ๋ฉด, n ์ด 0์ด ์๋ ๋ ๊น์ง 1 ๊ณผ and operator ์ ์ํํ ๊ฒฐ๊ณผ๋ฅผ ans ์ ๋์ ํ๊ณ n ์ right shift ํด์ ๊ฐฑ์ ํด์ฃผ๋ฉด ๋๋ค. ํน์ bitset ์ ์ด์ฉํ๋ฉด n bitset (n).count(); ์ผ๋ก ์ฝ๊ฒ ๊ตฌํ ์๋ ์๋ค. [C++] class Solution { public: int ..