![]() |
About arrange in array
Hi everyone :), I'm training on C++ language and I have some troubles about array. My problem is arranging in array. Example, I have an float array, I wanna sort my negative numbers descending on the left, the zero (0) numbers in the middle and positive number ascending on the right in three ways: selection sort, insert sort and bubble sort. I hope you spare a little time to help me.
Code:
#include <stdio.h> |
Re: About arrange in array
Hi, welcome to the vast world of programming. Two of the most essential tools you need are Google and Wikipedia. Googling each type of sort - for me - returned a well written Wiki article as the top hit; here are the links:
http://en.wikipedia.org/wiki/Bubble_sort http://en.wikipedia.org/wiki/Insertion_sort http://en.wikipedia.org/wiki/Selection_sort Also make sure you read IN FULL and act on this one: http://www.catb.org/~esr/faqs/smart-questions.html If you ask questions as outlined here you can be sure to get quality help. This is a great article. I'm going to put it in my sig, if I can. |
| All times are GMT +5.5. The time now is 14:04. |