LeetCode_Study_Plan/Programming Skills
-
1281. Subtract the Product and Sum of Digits of an Integer javaLeetCode_Study_Plan/Programming Skills 2022. 9. 19. 21:05
https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer/ Subtract the Product and Sum of Digits of an Integer - 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 class Solution { public int subtractProductAndSum(int n) { int producted = 1; int added = 0 ; i..
-
191. Number of 1 Bits javaLeetCode_Study_Plan/Programming Skills 2022. 9. 19. 20:48
https://leetcode.com/problems/number-of-1-bits/ Number of 1 Bits - 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 public class Solution { // you need to treat n as an unsigned value public int hammingWeight(int n) { int cnt = 0; while(n != 0) { cnt = cnt + (n & 1); n = n>>>1; } re..
-
1491. Average Salary Excluding the Minimum and Maximum Salary python javaLeetCode_Study_Plan/Programming Skills 2022. 9. 19. 20:20
https://leetcode.com/problems/average-salary-excluding-the-minimum-and-maximum-salary Average Salary Excluding the Minimum and Maximum Salary - 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 Java import java.util.Arrays; class Solution { public double average(int[] salary) { int N..
-
1523. Count Odd Numbers in an Interval Range python javaLeetCode_Study_Plan/Programming Skills 2022. 9. 19. 20:01
https://leetcode.com/problems/count-odd-numbers-in-an-interval-range/ Count Odd Numbers in an Interval Range - 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 Python3 def countOdds(self, low: int, high: int) -> int: diff = high - low + 1 if diff % 2 == 1: if low % 2 == 1: return in..
-
[Programming Skills I] 시작 그리고 도전LeetCode_Study_Plan/Programming Skills 2022. 9. 19. 19:39
최근에 지인의 소개를 듣고 LeetCode라는 사이트를 알게됐다. 1~2년 전에 조금 겉핥기식으로 감 잡아 보려고 백준 사이트에서 몇몇 문제를 풀어보긴 했는데 주변에서 알고리즘 젤 잘하는 지인에게 물어보니 백준은 대회 기반이고 리트코드는 기출 기반이라고 하여 이게 더 코딩테스트를 준비하기 적합하다고 판단하여 시작했다. 비전공자라 파이썬이 더 익숙한지라 파이썬으로 하려고 했지만 코테 개념 복기 겸 Java 문법 숙지겸으로 사이트를 돌아다니다가 Study plan의 Easy 34가 보여서 시작하기를 눌렀다. 6일 전 1문제를 심심해서 풀었던 것 같은데 이후 5일이 지났고 여전히 1문제만 클리어된 상태이다. 남은 6일동안 이 문제를 파이썬과 자바 두 가지 언어로 푸는 게 숙제인데, 과연 성공할 수 있을지 궁금..