time-complexity
JQUERY Time complexity
I tried the following code for updating the value of an element: first: $(this).parent().prev().children(\':selected\').val();[详细]
2023-02-28 22:16 分类:问答Whats the time complexity of finding a max recursively
I just wanted to make sure I\'m going in the right direction. I want to find a max value of an array by recursively splitting it and find the max of each separate array. Because I am splitting it, it[详细]
2023-02-28 13:49 分类:问答Fast way to remove a few items from a list/queue
This is a follow up to a similar question which asked the best way to write for item in somelist: if determine(item):[详细]
2023-02-27 09:50 分类:问答What is the time complexity of lookups in directed acyclic word graphs?
A directed acyclic word graph is a great data structure for certain tasks. I can\'t开发者_如何学Python find any information on the time complexity of performing a lookup though.[详细]
2023-02-27 05:36 分类:问答Time complexity of the code below?
Can someone tell me the time complexity for the following code? #include<iostream> #include<string.h>[详细]
2023-02-26 04:58 分类:问答Does HashSet.equals() run in constant time?
Just wondering if HashSet.equals(anotherHashSet) runs in constant time (also with a ConcurrentHashSet as argument), which I\'m assuming it does for efficiency reasons. Can\'t see anything which mentio[详细]
2023-02-21 23:39 分类:问答What is the most efficient way to detect duplicate characters in a String in Java?
Using data structures (HashMap) I was able to do it. This is the code: import java.util.*; class unique{[详细]
2023-02-19 23:21 分类:问答analysing an algorithm for time complexity
I have written a function that merges two linked list. (Note that the function is based on pre-given code in case you wonder why i\'m calling a function node(i)).[详细]
2023-02-19 19:21 分类:问答Time Complexity of the following code..?
I am confused with the time complexity of the following piece of code.... i = 0 //first row if(board[i][0] == win && board[i][1] == win && board[i][2] == win)[详细]
2023-02-19 14:50 分类:问答Finding contiguous ranges in arrays
You are given an array of integers. You have to output the largest range so that all numbers in the range are present in the array. The numbers might be present in any order.For example, suppose that[详细]
2023-02-19 04:23 分类:问答