By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,794 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

Sets - Bit Array Vs. List

P: n/a
Hello All:
What is the difference between these two. Is there any site that can show me
the contrast and similarities between both of these? I have a couple of
begginer books that make no reference on this issue. Please help. Thanks in
advance.

Sonoman

Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

Sonoman <fc*****@REMOVEspunge.org> wrote in message
news:2O*******************@fe03.atl2.webusenet.com ...
Hello All:
What is the difference between these two.
The standard library features a container type
called 'std::list'. The same is not true of
'bit array' (perhaps you meant something else?)
Is there any site that can show me
the contrast and similarities between both of these?
The standard library has a 'list' type, but not a
'bit array' type. Do you mean the 'std::bitset'
type?

If so, look in any programming or algorithms book
which should show you the difference between an
array and a linked list.
I have a couple of
begginer books that make no reference on this issue.
Which books?
Please help.


Peer reviews of C++ books can be viewed at
www.accu.org

-Mike

Jul 19 '05 #2

P: n/a

"Sonoman" <fc*****@REMOVEspunge.org> wrote in message
news:2O*******************@fe03.atl2.webusenet.com ...
Hello All:
What is the difference between these two. Is there any site that can show me the contrast and similarities between both of these? I have a couple of
begginer books that make no reference on this issue. Please help. Thanks in advance.

Sonoman


You asking about the implementation of sets using either arrays of bits or
lists? Not really a C++ question.

The obvious difference it that you can only implement sets whose members are
chosen from a finite range of integral values using a bit array. You
couldn't have a set of words implemented as a bit array for instance, but a
list of strings would be possible. There are also efficiency differences
between the two.

Of course the C++ answer is to use neither, use std::set instead, (or even
std::bitset) that's what its for.

john
Jul 19 '05 #3

P: n/a
C++ how to program by Deitel & Deitel, C++ in 21 days 2nd edition by Jesse
Liberty, but these two do not have much that I can use. BUT I just borrowed
from a friend The C++ programming Language by Stroustroup. I glanced at it
and it looks very promising. I just hope it does not go over my head! It
looks at lot more advanced that the other two.

Sonoman
"Mike Wahler" <mk******@mkwahler.net> wrote in message
news:bg**********@slb0.atl.mindspring.net...

Sonoman <fc*****@REMOVEspunge.org> wrote in message
news:2O*******************@fe03.atl2.webusenet.com ...
Hello All:
What is the difference between these two.


The standard library features a container type
called 'std::list'. The same is not true of
'bit array' (perhaps you meant something else?)
Is there any site that can show me
the contrast and similarities between both of these?


The standard library has a 'list' type, but not a
'bit array' type. Do you mean the 'std::bitset'
type?

If so, look in any programming or algorithms book
which should show you the difference between an
array and a linked list.
I have a couple of
begginer books that make no reference on this issue.


Which books?
Please help.


Peer reviews of C++ books can be viewed at
www.accu.org

-Mike


Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.