본문 바로가기

1day1commit21

[LeetCode] 9. Palindrome Number (python) Palindrome Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Problem 오늘의 문제는 Palinedrome Number을 판별하는 코드를 작성하는 것이다. Palinedrome 숫자란 121처럼 앞뒤를 바꿔도 똑같은 (전화번호 아님) 숫자를 말한다. 이 문제에서 주의해야 할 것은 음의 정수가 포함된다는 것이다! -121을 바꿔면 121-이므로 Palinedrome 숫자가 아니다. (설명도 적어야 한다.) First Try: Wrong A.. 2022. 4. 9.
[HackerRank] PlusMinus (python) Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with places after the decimal. Note: This challenge introduces precision problems. The test cases are scaled to six decimal places, though answers with absolute error of up to are acceptable. Example There are elements, two positive, two n.. 2022. 4. 9.
[LeetCode] 1046. Last Stone Weight 1 Day 1 Commit Challenge! 오늘은 리트코드의 last stone weight 를 풀어보았다. 아직 파이썬에 익숙하지 않아 다양한 함수를 불러오는 데에 어려움이 많다. Last Stone Weight - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 리트 코드의 Easy 단계의 문제들을 계속 풀어나갈 예정이다. 해답은 이렇게 ... class Solution(object): def lastStoneWeight(self, stones): """ .. 2022. 4. 8.