473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Bucketsort?

Is the bucket sort container/algorithm built in somewhere in the C++ std
or do I have to implement it myself?
Sep 17 '07 #1
10 5785
desktop wrote:
Is the bucket sort container/algorithm built in somewhere in the C++
std or do I have to implement it myself?
There is no bubble sort either. And no Shell sort. And no merge sort.
Actually, come to think of it, only Quick sort is identified, and it's
in the C++ library because it's in the C library. The C++ Standard
does not specify what kind of sort algorithm is used for std::sort,
std::stable_sort, and std::partial_sort[_copy].

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 17 '07 #2
Victor Bazarov wrote:
desktop wrote:
>Is the bucket sort container/algorithm built in somewhere in the C++
std or do I have to implement it myself?

There is no bubble sort either. And no Shell sort. And no merge sort.
Actually, come to think of it, only Quick sort is identified, and it's
in the C++ library because it's in the C library. The C++ Standard
does not specify what kind of sort algorithm is used for std::sort,
std::stable_sort, and std::partial_sort[_copy].

V
Ok I have found it here:

http://www.codecogs.com/cog-1

but I am not sure of the quality of the code from this place and it
seems that its not downloadable like boost or other quality expansions.

Any experience with codecogs?
Sep 17 '07 #3
desktop wrote:
Victor Bazarov wrote:
>desktop wrote:
>>Is the bucket sort container/algorithm built in somewhere in the C++
std or do I have to implement it myself?

There is no bubble sort either. And no Shell sort. And no merge
sort. Actually, come to think of it, only Quick sort is identified,
and it's in the C++ library because it's in the C library. The C++
Standard does not specify what kind of sort algorithm is used for
std::sort, std::stable_sort, and std::partial_sort[_copy].

V

Ok I have found it here:

http://www.codecogs.com/cog-1

but I am not sure of the quality of the code from this place and it
seems that its not downloadable like boost or other quality
expansions.
Any experience with codecogs?
Nope. I am a programmer, not a downloader/integrator. I use books
and other publications to learn the algorithms which I then implement
[and often modify] to suit our team's needs.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 17 '07 #4
Victor Bazarov wrote:
desktop wrote:
>Victor Bazarov wrote:
>>desktop wrote:
Is the bucket sort container/algorithm built in somewhere in the C++
std or do I have to implement it myself?
There is no bubble sort either. And no Shell sort. And no merge
sort. Actually, come to think of it, only Quick sort is identified,
and it's in the C++ library because it's in the C library. The C++
Standard does not specify what kind of sort algorithm is used for
std::sort, std::stable_sort, and std::partial_sort[_copy].

V
Ok I have found it here:

http://www.codecogs.com/cog-1

but I am not sure of the quality of the code from this place and it
seems that its not downloadable like boost or other quality
expansions.
Any experience with codecogs?

Nope. I am a programmer, not a downloader/integrator. I use books
and other publications to learn the algorithms which I then implement
[and often modify] to suit our team's needs.

V
In that case can you recommend a good book on data structures/algorithms
for C++?

I already have Sedegewicks 2 books for C and Thomas H Cormens
Introduction to Algorithms but would like to find something specific for
C++ with code samples.
Sep 17 '07 #5
On Sep 17, 4:00 pm, desktop <f...@sss.comwrote:
Victor Bazarov wrote:
desktop wrote:
Victor Bazarov wrote:
desktop wrote:
Is the bucket sort container/algorithm built in somewhere in the C++
std or do I have to implement it myself?
There is no bubble sort either. And no Shell sort. And no merge
sort. Actually, come to think of it, only Quick sort is identified,
and it's in the C++ library because it's in the C library. The C++
Standard does not specify what kind of sort algorithm is used for
std::sort, std::stable_sort, and std::partial_sort[_copy].
>V
Ok I have found it here:
>http://www.codecogs.com/cog-1
but I am not sure of the quality of the code from this place and it
seems that its not downloadable like boost or other quality
expansions.
Any experience with codecogs?
Nope. I am a programmer, not a downloader/integrator. I use books
and other publications to learn the algorithms which I then implement
[and often modify] to suit our team's needs.
V

In that case can you recommend a good book on data structures/algorithms
for C++?

I already have Sedegewicks 2 books for C and Thomas H Cormens
Introduction to Algorithms but would like to find something specific for
C++ with code samples.- Hide quoted text -

- Show quoted text -
A quick google search indicates that the NIST website has a bucket
sort
algorithm. It looks to be in C but you can use that as a starting
point.

BTW, the NIST library is mentioned in this NG's FAQ.

Sep 17 '07 #6
Victor Bazarov wrote:
desktop wrote:
Is the bucket sort container/algorithm built in somewhere in the C++
std or do I have to implement it myself?

There is no bubble sort either. And no Shell sort. And no merge
sort. Actually, come to think of it, only Quick sort is identified,
and it's in the C++ library because it's in the C library.
Nope. The qsort() function doesn't specify a sorting algorithm.


Brian
Sep 17 '07 #7
desktop wrote:
Victor Bazarov wrote:
>[..] I am a programmer, not a downloader/integrator. I use books
and other publications to learn the algorithms which I then implement
[and often modify] to suit our team's needs.

V

In that case can you recommend a good book on data
structures/algorithms for C++?
Don't be ridiculous. There is no single book that contains all
algorithms one can ever need. Not to mention with code samples.
I already have Sedegewicks 2 books for C and Thomas H Cormens
Introduction to Algorithms but would like to find something specific
for C++ with code samples.
If you want to develop/grow as a programmer, you don't need code
samples. If you, however, just need to get from point A to point B
in your development tasks, and move on to other tasks, think of some
third-party library. Books can be outdated, and often full of typos.

Here are some useful books where some algorithms can be found:

"Scientific and Engineering C++"
"Numeric Recipes for C++"
"Graphics Gems" series
"The Art of Computer Programming"

.... and plenty of field-specific ones, of course. But don't rely
on any book alone.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 17 '07 #8
Default User wrote:
Victor Bazarov wrote:
>desktop wrote:
>>Is the bucket sort container/algorithm built in somewhere in the C++
std or do I have to implement it myself?
There is no bubble sort either. And no Shell sort. And no merge
sort. Actually, come to think of it, only Quick sort is identified,
and it's in the C++ library because it's in the C library.

Nope. The qsort() function doesn't specify a sorting algorithm.
Not only that, but [in C99] it doesn't even specify a time complexity
(see ISO/IEC 9899:1999 7.20.5.2)
Sep 17 '07 #9
Victor Bazarov <v.********@comAcast.netwrote:
If you want to develop/grow as a programmer, you don't need code
samples.
Are you serious?

We got from http://www.biopix.dk/Photo.asp?Langu...&PhotoId=10118
to
http://content.techrepublic.com.com/...969.html?seq=1

by learning from the doings of others.

But who cares - it's just the same old silicon.
Sep 18 '07 #10
Ole Nielsby wrote:
Victor Bazarov <v.********@comAcast.netwrote:
>If you want to develop/grow as a programmer, you don't need code
samples.

Are you serious?

We got from http://www.biopix.dk/Photo.asp?Langu...&PhotoId=10118
to
http://content.techrepublic.com.com/...969.html?seq=1

by learning from the doings of others.

But who cares - it's just the same old silicon.
You're apparently misreading (or misinterpreting) what I wrote. The
OP asked for code to be downloaded and used. Reading the code to
learn to program is a necessity, but sometimes (I find it more often
than some, perhaps) one needs to cast some code away to overcome
a common misconception or to avoid making the same mistake as the
author of the code snippet.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 18 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Imran | last post by:
I have a vector of integers, such as and I want to find out the number which occurs most frequently.what is the quick method. My array size is huge. what I am doing is 1. find out the...
7
by: ^cypis^ vel. SQ9JTI | last post by:
Hi, i need your help. I have to prepare a homework, easy program, which will be sorting the values from txt file and writing the solution to another txt file. It has to be a bucket sort. Have...
5
by: ^cypis^ vel. SQ9JTI | last post by:
Hi there, i have a problem. I prepared bucket sorting with reading values from file (data.txt) and saving to other file (aus.txt). Everything is good if we talk about reading and sorting, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.