• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Ordering

 
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A isn't next to B, C isn't next to D or B. B isn't next to E; neither is C, and D should be left of E.
Can you correctly put these letters in order from left to right ?
You could code a sort algorithm if you so wish.
regards
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my lash at it
 
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BDEAC
 
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BDECA
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am assuming you checked your answers.
OK , here's a slight variation.
A isn't next to B, C isn't next to D or B. B isn't next to E; neither is C, and D should be on E's left.
Can you correctly put these letters in order from left to right according to your perspective ?
regards
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If "D should be on E's left" means to the right of E, when looking at E, then
CAEDB
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
HS Thomas
Ranch Hand
Posts: 3404
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael, you do realise that you have the beginnings of a program that would work out seating arrangements for a dinner at a diplomatic function ?
Arafat isn't next to Ariel Sharon....
GW Bush isn't next to Bill Clinton .....
(Bush: Are you still President ?
Clinton: The last time I checked, yes!)

Of course you could get away with inserting the wives in between, but you'd also need to know who's wife it is!
Clinton : **** X-rated stuff ******
Hilary : President Clinton, to you, sir!
Clinton : Oh! I thought I remembered you from somewhere !
*****************************************
Cherie : I suffer from the Allerednic syndrome (Cinderella in
reverse, when a capable woman is condemned to a life of
drudgery through marriage).
Tony : Heh! Heh! I am on paternity leave at the moment.
Cherie : Tony, it's time for Little Leo's nappy change.
Tony : Humph! Why do I have to change him ALL the time!
Cherie : 'Cos Carol said it's good for your image.
regards
[ September 20, 2003: Message edited by: HS Thomas ]
 
He was giving me directions and I was powerless to resist. I cannot resist this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic