Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities includingStack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Loading…
Code Review

Questions tagged [complexity]

Ask Question

Complexity is the analysis of how the time and space requirements of an algorithm vary according to the size of the input. Use this tag for reviews where the "Big O" is a concern.

419 questions
Filter by
Sorted by
Tagged with
5votes
1answer
363views

BackgroundI can't seem to find an existing answer solving this doubt of mine.In academic books, it seems that DFS is usually presented in both recursive and iterative forms.The implementations ...
7votes
3answers
1kviews

I am a C++ programmer trying to learn C.Please critique my C code here. I am trying to make a small "hash table" that's \$O(n)\$ lookup. But, it is stack-based and so should be no slower ...
ijklr's user avatar
5votes
4answers
558views

Given an input string contains letters from 'a' to 'g'Count how many substrings are there in the input string such thatfrequency of any character inside the substring is not more than thenumber of ...
12votes
5answers
2kviews

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 with0s....
7votes
4answers
552views

I developed a heap sort variant that sorts a heap through traversal. Unlike in the standard heap sort, the algorithm does not remove the min element from the heap instead it traverses all the nodes of ...
2votes
2answers
437views

Problem Statement(Source: Leetcode Problem 4: Median of Two Sorted Arrays [Hard])(Topics: [Array] [Binary Search] [Divide and Conquer])Given two sorted arrays ...
2votes
2answers
271views

I'm working on a C# project and have a bloater methodValidateBusinessRules that checks a series of business rules for validating the operations. The current code ...
Pranav Bilurkar's user avatar
2votes
2answers
94views

I've been working on the classic LFU (Least Frequently Used) cache running in O(1) time problem lately and, as a student, I kind of struggled with the algorithms I found online. I got most of the idea ...
NicolaM94's user avatar
5votes
1answer
396views

I'm trying to first formulate this challenge.In short, we want to sum up an stream of random numbers with the following objective:The objective is "simply" to sum up as many sequences as ...
Aicody's user avatar
2votes
1answer
276views

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 Wonderlandrollercoaster ride. Each person wears a sticker ...
5votes
2answers
857views

I came across this question which asks to create a function which will return true/false based on the passed array containing all the letters to make up the passed word. Each letter from array can ...
user282070's user avatar
7votes
1answer
307views

Given a graph \$G(V, E)\$ with vertices \$V\$ and edges \$E\$, where each vertex is associated with a single color from a set of colors \$C=\{1, 2, ..., k\}\$, we define the following problem:Problem ...
4votes
1answer
169views

This question is from the PCTC 2022 R2 Past Paper and is a follow-up on my previous question. Previous questionI have implemented several solutions suggested, such as creating an array with pages ...
6votes
4answers
630views

While practicing for a school coding challenge, I came across this problem. My code got the right answers but exceeded the time limited. Any tips for how to reduce the time complexity?https://pctc....
4votes
3answers
727views

The problem is:Given an integer arraynums, return all the triplets[nums[i], nums[j], nums[k]] where ...

153050per page
1
2345
28

Hot Network Questions

more hot questions
Newest complexity questions feed

[8]ページ先頭

©2009-2025 Movatter.jp