About 57 results
Open links in new tab
  1. Python Logic of ListNode in Leetcode - Stack Overflow

    Python Logic of ListNode in Leetcode Asked 6 years, 8 months ago Modified 4 years, 8 months ago Viewed 116k times

  2. python - LeetCode 2. Add Two Numbers - Code Review Stack Exchange

    Dec 12, 2025 · LeetCode's data structures LeetCode's linked list data structure is dumb. It doesn't do nice things like let you iterate over it using built-in functionality in Python. But you don't have to live …

  3. python - LeetCode - 2. Add Two Numbers - Stack Overflow

    Dec 13, 2023 · I'm attempting to address Leetcode problem 2. Add Two Numbers: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, …

  4. python - Optimizing LeetCode's "Minimum Pair Removal to Sort Array …

    Apr 6, 2025 · I am working on the LeetCode problem 3510. Minimum Pair Removal to Sort Array II: Given an array nums, perform the following operation any number of times: Select the adjacent pair …

  5. how does python functions inside 'Class Solution' get called ...

    May 12, 2024 · in leetcode python problems, we have the following structure-- Class Solution: def function(): {some code here} i completed the function of the specific problem but i didn't call the func...

  6. python - Why am I getting a runtime error on LeetCode submision part ...

    Sep 23, 2023 · I have created a program for a problem on LeetCode and it actually works on any Python code editor. But when I run it on the LeetCode submission portion, it shows a runtime error.

  7. How can i improve my python code of leetcode problem 345 and how …

    Mar 9, 2025 · How can i improve my python code of leetcode problem 345 and how i can i improve the time complexity [closed] Asked 9 months ago Modified 9 months ago Viewed 149 times

  8. python - Why does this greedy algorithm work for "Lexicographically ...

    Mar 26, 2025 · I am looking at solutions to the LeetCode problem 3474. Lexicographically Smallest Generated String: You are given two strings, str1 and str2, of lengths n and m, respectively. A string …

  9. python - How do I properly input my own test cases in my own IDE for ...

    How do I properly input my own test cases in my own IDE for problems in leetcode.com? Asked 5 years, 7 months ago Modified 2 years, 1 month ago Viewed 8k times

  10. python - Two Sum on LeetCode - Stack Overflow

    May 4, 2015 · I'm trying to do a LeetCode Two Sum question: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return …