About 50 results
Open links in new tab
  1. Reversing an array in Python - Code Review Stack Exchange

    Feb 18, 2017 · Reversing an array in Python without using a built-in function:

  2. python - "Almost Sorted" coding challenge - Code Review Stack …

    Mar 8, 2018 · The "Almost Sorted" problem from HackerRank: Given an array with n n elements, can you sort this array in ascending order using only one of the following operations? Swap two …

  3. python - Sorting array by odd numbers while leaving the even …

    Jun 23, 2023 · The problem given was: "You will be given an array of numbers. You have to sort the odd numbers in ascending order while leaving the even numbers at their original positions." …

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

    Dec 12, 2025 · The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not contain any …

  5. python - Reverse dictionary where values are lists - Code Review Stack ...

    Apr 3, 2019 · Reverse dictionary where values are lists Ask Question Asked 6 years, 10 months ago Modified 6 years, 10 months ago

  6. python - Reversing vowels in a string - Code Review Stack Exchange

    Jul 3, 2024 · 7 Given a string s, reverse only all the vowels in the string and return it. The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both lower and upper cases, more than once. My code …

  7. Leetcode Two Sum code in Python

    Jan 26, 2019 · Here's my solution for the LeetCode's Two Sum problem. Problem: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may …

  8. python - Reversing the elements in the list - Code Review Stack Exchange

    May 16, 2015 · Q1. Define a function reverse_list that takes a list as an argument and returns None, but reverses the elements in the list as a side effect. Do not use any built-in list methods (especially not

  9. python - ASCII code decode to string - Code Review Stack Exchange

    Apr 21, 2019 · The ASCII string is then reversed to get the encoded string " 0018014111117811180180110127 ". The characters in encoded string are within the range 10 - 126 …

  10. python - Leetcode 3sum problem solution - Code Review Stack Exchange

    Mar 3, 2024 · This transformation is strongly tied to the specific requirements of the question: for i in range(n): # creating a hash map of the array for quick lookups num_map[nums[i]] = i We're storing …