Post by rubina9898 on Dec 24, 2023 22:06:44 GMT -5
When you enter a set of numbers in which a given number occurs more than once the algorithm puts that number first even if it is not the smallest in the set. An example set of numbers for which the described problem occurs is " ". The result returned by my algorithm is " ". The expected result is " ". The situation repeats for each set of numbers that meets the described condition. My implementation of the bubble sort algorithm looks like this algorithm code here I would be grateful for any tips that could lead me to the source of the problem.
The first question is actually a question that cannot be answered well. First of all the question is it is not even clear what the author's actual problem is. All the answerer can do is read the tea Phone Number List leaves. From my perspective the first question is a question that I don't even want to answer. In the case of the second question the situation is significantly better. First of all the problem was defined. The error conditions are described and an example data set is provided. Most importantly the question contains the algorithm code. A nice touch is also a greeting and a last sentence of gratitude.
This question has a much greater chance of finding an addressee who will be able to answer it in a satisfactory way. Please read the question before posting Before clicking the "publish" button it's a good idea to read the entire question again carefully and make sure you've included all the relevant details. There is another significant advantage to reading the question in its entirety before posting. This way we can practice the Duck Debugging method on ourselves . I can't count how many times the answer to my question came to my mind after writing the question or was even included in the question I wrote. Show empathy After receiving a response it's worth saying thank you . For example on Stack Overflow the correct answer can be marked with a green tick.
The first question is actually a question that cannot be answered well. First of all the question is it is not even clear what the author's actual problem is. All the answerer can do is read the tea Phone Number List leaves. From my perspective the first question is a question that I don't even want to answer. In the case of the second question the situation is significantly better. First of all the problem was defined. The error conditions are described and an example data set is provided. Most importantly the question contains the algorithm code. A nice touch is also a greeting and a last sentence of gratitude.
This question has a much greater chance of finding an addressee who will be able to answer it in a satisfactory way. Please read the question before posting Before clicking the "publish" button it's a good idea to read the entire question again carefully and make sure you've included all the relevant details. There is another significant advantage to reading the question in its entirety before posting. This way we can practice the Duck Debugging method on ourselves . I can't count how many times the answer to my question came to my mind after writing the question or was even included in the question I wrote. Show empathy After receiving a response it's worth saying thank you . For example on Stack Overflow the correct answer can be marked with a green tick.