You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- 38I like asking this question in interviews: "When is quick-sort better than bubble-sort?" The answer to the question provides insight into the practical application of complexity theory and not just plain black and white statements such as O(1) is better than O(n) or O(k) is equivalent to O(logn) etc....Matthieu N.– Matthieu N.2010-02-04 06:30:44 +00:00Commented Feb 4, 2010 at 6:30
- 70@Beh, I think you meant "when is bubble-sort better than quick-sort" :PKornel Kisielewicz– Kornel Kisielewicz2010-02-04 16:17:24 +00:00Commented Feb 4, 2010 at 16:17
- 3Would a smart pointer be a trivial key?thomthom– thomthom2013-12-09 10:42:57 +00:00Commented Dec 9, 2013 at 10:42
- 8@Matthieu N. In your place, using this kind of question which will hardly ever be useful and which unnecessarily embarrasses a lot of candidates, I would rather be embarrassed :/user6547518– user65475182021-08-17 12:47:12 +00:00Commented Aug 17, 2021 at 12:47
- 12FWIW, in response to @user6547518, it does seem like a rather stupid interview question. If I had any need to implement a sorting algorithm from scratch, I'd consider the particular needs/constraints in my situation, and revisit the descriptions of sorting algorithms before implementing it. 35 years ago, before the internet and standard implementations in the languages I use, I probably knew the difference between those two, but I no longer feel the need to retain information like that.cosimo193– cosimo1932022-10-26 12:05:20 +00:00Commented Oct 26, 2022 at 12:05
| Show 1 more comment
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cpp