CARVIEW |
Select Language
HTTP/2 200
date: Mon, 21 Jul 2025 11:56:31 GMT
content-type: text/html; charset=utf-8
cf-ray: 962a83f45ec01712-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=e24bbd90-9d7f-452d-874b-2c2c4ef9de87; expires=Tue, 21 Jul 2026 11:56:30 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-frame-options: SAMEORIGIN
x-request-guid: 377b7671-9289-4943-926f-77f7d89bb567
x-worker-origin-response-time: 557000000
x-dns-prefetch-control: off
set-cookie: prov=e24bbd90-9d7f-452d-874b-2c2c4ef9de87; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=yKkVFKNs.YMpcT_7vv7H7KZY_lqcnD0HALu6UhI4VXU-1753098991-1.0.1.1-CuyK1ui6x1C__Sc7VE_PBwxQtbzfpU209EMGvNbI.JfWq0bbXMXTFt.C.mSwKnTLGFlpPauE.uMH1SRN2ujfRfgx9OJgs9BACtbOGf5rTT8; path=/; expires=Mon, 21-Jul-25 12:26:31 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=FMcysEX4tlkksASeB18oAohqNcS3njHV8DXV5zeMLq0-1753098991398-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'time-limit-exceeded' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [time-limit-exceeded]
When the code scales so poorly in the face of large inputs that it cannot complete in a reasonable amount of time, use this instead of the [performance] tag.
1,069 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
6
votes
3
answers
656
views
N queen problem-like (+rooks and a different goal)
The problem is:
You have Q queens and R rooks on a board with sides of length (R+Q) ≤ 8, and you have to place all the pieces so that none attack any other piece. Each square on the board has a score ...
-4
votes
0
answers
111
views
LeetCode Problem: Find the Original Typed String II
LeetCode Problem:
Alice is attempting to type a specific string on her computer.
However, she tends to be clumsy and may press a key for too long,
resulting in a character being typed multiple times.
...
6
votes
2
answers
427
views
(Codewars) Goldbach's Conjecture (by @rsalgado) in Ruby
Link to kata: linkRank: 6 kyuKata author: @rsalgado
I have been recently learning Ruby-lang and have been attempting to solve the following kata from Codewars involving Goldbach's Conjecture:
...
7
votes
2
answers
528
views
Subtracting the sum of the current digits from a positive integer N until it reaches 0
Given a positive integer N, subtract the sum of its digits and count how many times this operation must be applied to make N become 0.
...
2
votes
2
answers
450
views
Leaderboard ranking system in Python
I'm working on an assignment where I have to implement a leaderboard system using only Python's standard libraries (no external packages allowed). However, my current code keeps getting TLE (Time ...
5
votes
4
answers
514
views
Count number of substrings in less time
Given an input string contains letters from 'a' to 'g'
Count how many substrings are there in the input string such that
frequency of any character inside the substring is not more than the
number of ...
6
votes
2
answers
255
views
(HackerRank) Project Euler+ #250: 250250
Link to problem: linkNumber of solvers: 27 out of 844Solve rate (per person): 3.199%Success rate (over all submissions): 1.78%
Project Euler+ on HackerRank is basically supposed to be a generalization ...
8
votes
5
answers
1k
views
LeetCode 977: Squares of a sorted array, maintaining non-decreasing order
I tried solving the LeetCode question like many others, trying to incorporate the O(n) time complexity requirement.
Squares of a Sorted Array
Given an integer array ...
13
votes
5
answers
2k
views
solve n*m matrix processing in less time
I want to solve a problem in less time complexity. Here are the details:
Given an n*m matrix, n rows and m columns. Initially, the matrix is empty filled with 0s.
...
2
votes
2
answers
403
views
Median of two sorted arrays in Python
Problem Statement
(Source: Leetcode Problem 4: Median of Two Sorted Arrays [Hard])(Topics: [Array] [Binary Search] [Divide and Conquer])
Given two sorted arrays ...
1
vote
1
answer
205
views
golang - Kth largest element in an array using quick select - time limit exceeded issue
I am trying to solve the following problem in leetcode.
https://leetcode.com/problems/kth-largest-element-in-an-array/description
Given an integer array \$nums\$ and an integer \$k\$, return the \$k^\...
9
votes
3
answers
2k
views
Is set of integers closed under the operation of subtraction?
I was working on a problem, but my solution did not pass the time limit test.
Problem
Let's say a set of integers is closed under the operation of
subtraction if for two distinct elements of this set ...
7
votes
8
answers
2k
views
Reversing vowels in a string
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 ...
2
votes
1
answer
170
views
Count how many numbers in a range have exactly three divisors
The challenge
Given array a of n numbers, I need to count how many positive numbers less than each aᵢ have exactly 3 divisors.
Constraints
1 <= aᵢ <= 2.5 * 10¹³
In other words,
the minimum ...
2
votes
1
answer
217
views
Hackerrank "New Year chaos" solution - permute sequence by swapping adjacent terms
I was doing the Hackerrank "New Year chaos" problem. Here is the description:
It is New Year's Day and people are in line for the Wonderland
rollercoaster ride. Each person wears a sticker ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
programming-challenge × 513
python × 396
algorithm × 253
c++ × 217
java × 172
python-3.x × 144
performance × 121
primes × 66
beginner × 65
c × 52
javascript × 52
strings × 50
c# × 43
dynamic-programming × 38
combinatorics × 37
mathematics × 37
python-2.x × 35
complexity × 34
graph × 34
array × 31
ruby × 26
sorting × 26
recursion × 25
vba × 24
excel × 22
more related tags
Hot Network Questions
- How is “unerlaubt” working in this paragraph?
- Why is my gooseberry jam so stiff?
- Is the Targum Onkelos halachically binding?
- Wrapping minipage around a tabularx cell produces overlapping text as of TeXLive 2025
- Is classical logic the consensus among contemporary logicians?
- How can I grow kelp or seaweed at home in a small container?
- What are the earliest manuscripts containing Acts 21:25. And what do they say?
- Flow velocity due to stack effect (chimney effect)
- Parsing \def patterns with braces
- How Does the Spell Sniper Feat Interact with the Magic Stone Cantrip?
- Compiling stand-alone function binaries from the Linux kernel
- Repository with SQLite in Python
- Movie with a young Black male lead that ends with the Serenity Prayer
- When you view a historical event with incorrect modern lens
- What is the significance of the name "Toyohiro Kanedaichi"?
- What are the differences between a big jet engine and a small jet engine?
- Cannot find custom class in bpy.types after registration
- Equivalent idiom in English about something annoyingly appearing everywhere
- When should the DM announce an opponent's death?
- Is it normal to require to reference all figures and tables in the text?
- Do water heaters create visible ripples in the surrounding water?
- Tikz - How to draw multiple arrows between nodes and position them perfectly without the usage of angles?
- Can a 2024 Monk use Stunning Strike with a thrown dagger, javelin or spear?
- Is it legal for businesses to give financial incentives for leaving positive reviews on review sites (e.g., Google Maps, Yelp, Facebook, Amazon)?