Sunday, July 12, 2009

Balance a Linked List in C++?

How do I balance a linked list in C++?





To balance, I mean sorting the nodes in the list so that the node with the greatest value is at the head of the list, the second greatest node is at the end, and so on... (the data type is double)





Thanks for you help!!!

Balance a Linked List in C++?
No, he/she means this I believe:





100 98 96 95 97 99





As for how to do this...interesting question. One thought is to take the original list and sort it:





100 99 98 97 96 95





Then take a pass through, skipping every other element until the middle:





100 98 96





Then make a second pass in the opposite direction:





95 97 99





Glue these two lists together.
Reply:So you don't really mean "balance" but rather simply "sort" in descending order. Correct?





Once the list is created (or manipulated) you need a sort routine to quickly sort it. If the list will be large, like in the thousands of nodes level, then create a quicksort routine. (Search the web for libraries or code - many exist).





Otherwise, just code up a simple exchange sort for smaller lists.


Is Michael Rosenbaum an A list or a B List, or even a C-list Actor?

You can't call him A because he doesn't do that kind of work. He is amazing at what be does though, so give him a few years and he might eventually get there.

Is Michael Rosenbaum an A list or a B List, or even a C-list Actor?
oh he is so divine.....i love him but i would have to say b-list. :(
Reply:A sexy list actor. hehe I don't really know what category he's in, maybe B... definitely not A. A-listers tend to be splashed all over the magazines and I never see him in any of them. Whatever he is, though... definitely sexy. C'mon, white man who can pull off being BALD! Gotta give him props.
Reply:it all depends on how you define and gradate your celebrities.


As a TV actor with no major films to his credit I would put him at a solid B-/C+.





But that is using the following scale.





Movie star who can be ID'd by only one name = A list


TV stars w/ solid Film credits = B list


singer//comic/ etc. trying to become an actor = C list


comics, has beens, That guy/girl from that movie= D list


Reality stars, one hit wonders, et al = Z list





Be advised talent is irrelevant, much like in real Hollywood


I can't get the alerts and sounds to come on when I reveive or send a IM. Or that one from my messagner list c

I have tried the preference and clicked on alerts and sound but I still can't get it.

I can't get the alerts and sounds to come on when I reveive or send a IM. Or that one from my messagner list c
go to tools %26gt; options %26gt; alerts and sounds %26gt; then check everything u want .. (( i think u tried this and didn't work ))





another reason may cause this : check ur status ,, it ur status is set to "busy" then u can't get any alerts or sounds ,





good luck ;)
Reply:wow that stinks, have u tried settings by any chance?


jw

phlox

How to enter to show address list in c++. ?

in c++ programming, When i declaring data types for address as char to display address list, this not functioning.

How to enter to show address list in c++. ?
char can take only a single character





To accept strings create an array of characters





eg: char a[10];





It can store 9 characters(can't store blank space)





Now read the word as cin%26gt;%26gt;a;
Reply:Learn proper English first then post a question.


I cannot make out anything of your question. Its too jumbled.


Why did my boss waste $300 on stock photos of C-list celebrities?

It's not like we can actually use them. Please, make fun of my boss as much as you'd like.

Why did my boss waste $300 on stock photos of C-list celebrities?
'cause he's an idiot!
Reply:He was bored. When it's HIM running the building, everything is boring. Also he's never been able to even say "Hi" to a girl without getting slapped. I guess he just wants his precious moments with some now very depressed person.
Reply:What a stupid twat.
Reply:Boss has too much extra money.


Should "Dancing with the Stars" change its name to "Dancing with the C-list wannabes?"?

After looking over the upcoming season's "stars" I find myself saying over and over, "Who the hell is that?"

Should "Dancing with the Stars" change its name to "Dancing with the C-list wannabes?"?
I was wondering the same thing. I seriously don't understand why this show is so popular. It is just full of washed up "celebrities".
Reply:I don't watch the show, but I saw the list of the celebrities from this past year and this coming up year. I knew almost everyone from this past year and thought it was a good group of stars, but I looked over this year's list and barely knew any of them, I thought they made pretty bad selections.
Reply:lol
Reply:me as well with the exception of Osmond, Garth and Seymour
Reply:I don't watch it. could care less.
Reply:I've never watched that show and don't intend to start now. if there were real stars i would watch but they are not stars by any stretch of the imagination.
Reply:I was thinking more along the lines of D-list wash-ups
Reply:YES, YES, and YES! Thank you for saying it. What the hell have Mario Lopez or Ian Zerring done in the last 10 that would qualify them as Stars?
Reply:I only know one person that is going to be on that show and she is from the Cheetah Girls haha. Sad eh?
Reply:your title for the show is so true. I guess we'll never see Kathy Griffin cuz she's on the "D" list---lol


Hi,in IT jobs Ads they give list like C/C++,ASP.NET....?

I mean list of courses likeJAVA/J2EE,C#,C,C++,


TESTING TOOLS....etc.,It means the candidate should


know all the above things or just one/few know.plz.guide me,Thanx.

Hi,in IT jobs Ads they give list like C/C++,ASP.NET....?
No, they dont expect you to be a pro at everything but you should be somewhat knowledgeable and familiar with majority of them. But of course they would rather hire the one who knows more.
Reply:Well since Java and the C-languages (althoug C itself is a little different) it doesn't make a problem for you to know the basics of each language if you know how to use one of them properly. Some web-application link like ASP.Net and the .Net framework generally shold be known. Very important ar database skills, like MS-SQL (for internet with ADO-objects) server or MySQL. It's also good to have basic skills in business software like SAP R/3. So they don't expect you to be a pro in every single language, but if you're good in one it shouldn't take too much to adapt to another one.

verbena