Programming tricks & problems
I have somme programming questions if sommebody can help me:
1.You have an array of characters. Give an efficient alghoritm to reverse the order of words in it ( no order of characters).
2. An array of pointers to (very long) strings. Find pointers to the (lexicographically) smallest and largest strings.
3. Compute the number of ones in an unsigned integer ( without using any loops).
Thanks!
You may want to look at this site to see how to count bits, it has many different methods:
http://www.caam.rice.edu/~dougm/twiddle/
http://www.caam.rice.edu/~dougm/twiddle/
---Ranok---
Sounds to me like somebody has some homework assignments... Either that or he was "just wondering" 
Hehe

Hehe
strange things to just ''wonder'' about. very specific thoughts indeed.
quote:
Original post by Ranok
You may want to look at this site to see how to count bits, it has many different methods:
http://www.caam.rice.edu/~dougm/twiddle/
Thanks Ranok! Your link really helps me ( at least with first problem).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement