Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8110353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:43:29+00:00 2026-06-06T01:43:29+00:00

I am working on an Android application that needs to determine the current tee

  • 0

I am working on an Android application that needs to determine the current tee order based on scores in a round of golf. For those of you that don’t know, the tee order (or honors) is the order a player hits their ball from the tee based on who had the best (lowest) score from the previous hole (current hole-1). If there are ties, then I need to look at the current hole-2 …etc. until I have figured out the order, or checked all scores at which point I would use the order they started in. Once I figure out an order for a player, I would stop checking the scores for that player. The catch is that players can start on any hole. There can also be any number of holes. So if they start on hole 3, then they will end on hole 2. So they will get to hole 18 (Assuming an 18 hole course) and then wrap around and start on hole 1. If you need a better explanation, let me know and I’ll try.

Example data:
Holes: 9
Starting hole: 3
Player 1: 0,0,5,4,5,6,3,2,5
Player 2: 0,0,4,2,5,3,3,6,3
Player 3: 0,0,4,3,7,3,2,2,5

Assume the starting order is: Player 1, Player 2, Player 3

Example Output of the order after calculation:
Player 2, Player 3, Player 1

I have attacked this problem thinking it was going to be pretty easy but it is turning out to be harder than I thought. I have gone the iterative route starting by looping through each player, then looping through each players’ scores for the first hole that they all have a score on… etc but I am finding I have a lot of for loops and it is just becoming ugly with a ton of if statements. I was going to try a recursive solution but I wanted to see if anyone had any ideas about, while I take a short break from it. If anyone wants to see my code I currently am at work and testing it in PHP because we don’t have Java on my dev server so the code will be in PHP. But it will be easy enough to port to Java. Thanks for any and all help!

Edit: I should also note, that I will want to know this information at any time, whether they have finished the round or not. So if they start on hole 3 and have only played 2 holes then I need to account for the un-played holes. If that wasn’t obvious already…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:43:30+00:00Added an answer on June 6, 2026 at 1:43 am

    You just need one loop.

    Loop through the hole numbers (beginning with their starting hole and wrapping back to 1 if necessary).

    At each hole, look up the players’ scores for that hole, and then update the current state of who has honors.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an Android application that needs to download an image and display
I am currently working on an Android application that needs to publish a live
I am currently working on a C-based, NDK-based, Android application. This application needs to
I am working android application that required login, Now I want After successfully login
I am working on an android application that determines user location in osm maps.
Hey I was working on an android application that sends and receives text messages,
I am working on a private android application that will involve the use of
When working on a localized Android application, I found it a bit annoying that
I am working on an Android application that is required to connect to a
I'm working on an SMS Application for Android, which undoubtedly needs to send SMSes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.