python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Time/space complexity of string splitting/object creation in c++
I'am struggling to figure out the time complexity of a piece of code that I have that takes a user input from 1 line e.g open 1 0, and splits the input via spaces, then allows the user to create a new...
patricebailey1998
Votes: 0
Answers: 2
What is the space complexity of a recursive function that searches a BST? - O(h) or O(log(n))?
So I have written some code for a BST, where I am looking for whether a target node is contained in it.
At every recursive call, half of the tree gets 'eliminated', i.e. we reduce the number of nodes ...

Patrick_Chong
Votes: 0
Answers: 1
Nested Collection.stream() in for loop time and space complexity
I have an algorithm of which I need to find the space and time complexity.
public static List<Integer> myList(String niceKeys, String badKeys,
Lis...
newLearner
Votes: 0
Answers: 1
Methods of decreasing algorythm complexity
I am trying to programme a function that takes a non-negative integer, and returns a list of non-negative integer pairs whose values - when squared - sum to the given integer.
examples:
5 --> [...
Dawid Wraga
Votes: 0
Answers: 1