大约有 10,151 项符合查询结果(耗时:0.0278秒) [XML]
Big-oh vs big-theta [duplicate]
It seems to me like when people talk about algorithm complexity informally, they talk about big-oh. But in formal situations, I often see big-theta with the occasional big-oh thrown in.
I know mathematically what the difference is between the two, but in English, in what situation would using big-oh...
When is each sorting algorithm used? [closed]
What are the use cases when a particular sorting algorithm is preferred over others - merge sort vs QuickSort vs heapsort vs 'intro sort', etc?
...
How exactly does tail recursion work?
I almost understand how tail recursion works and the difference between it and a normal recursion. I only don't understand why it doesn't require stack to remember its return address.
...
Code Golf - π day
Guidelines for code-golf on SO
26 Answers
26
...
How can I replace a newline (\n) using sed?
How can I replace a newline (" \n ") with a space (" ") using the sed command?
42 Answers
...
How can I put strings in an array, split by new line?
I have a string with line breaks in my database. I want to convert that string into an array, and for every new line, jump one index place in the array.
...
Function for Factorial in Python
How do I go about computing a factorial of an integer in Python?
8 Answers
8
...
Maximum single-sell profit
Suppose we are given an array of n integers representing stock prices on a single day. We want to find a pair (buyDay, sellDay) , with buyDay ≤ sellDay , such that if we bought the stock on buyDay and sold it on sellDay , we would maximize our profit.
...
What is the best way to get all the divisors of a number?
...
16 Answers
16
Active
...
How to sort in-place using the merge sort algorithm?
I know the question is not too specific.
10 Answers
10
...