본문 바로가기
반응형

Problem Solving232

[리트코드 leetcode] 328. Odd Even Linked List leetcode.com/problems/odd-even-linked-list/ Odd Even Linked List - 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 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def oddEvenList(self.. 2021. 4. 12.
[리트코드 leetcode] 24. Swap Nodes in Pairs leetcode.com/problems/swap-nodes-in-pairs/ Swap Nodes in Pairs - 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 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def swapPairs(self, he.. 2021. 4. 12.
[리트코드 leetcode] 2. Add Two Numbers leetcode.com/problems/add-two-numbers/ Add Two Numbers - 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 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def addTwoNumbers(self, l1: Li.. 2021. 4. 12.
[리트코드 leetcode] 206. Reverse Linked List leetcode.com/problems/reverse-linked-list/ Reverse Linked List - 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 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseList(self, .. 2021. 4. 12.
[리트코드 leetcode] 234. Palindrome Linked List leetcode.com/problems/palindrome-linked-list/ Palindrome Linked List - 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 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def isPalindrome.. 2021. 4. 12.
[리트코드 leetcode] 121. Best Time to Buy and Sell Stock leetcode.com/problems/best-time-to-buy-and-sell-stock/ Best Time to Buy and Sell Stock - 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: def maxProfit(self, prices: List[int]) -> int: max_profit = 0 sum = 0 for i in range(1, len(prices)): sum = max(sum+prices[i]-pri.. 2021. 4. 12.
반응형