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 9199733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:36:10+00:00 2026-06-17T22:36:10+00:00

A double gutter in poker is when you have 2 gut shots to a

  • 0

A double gutter in poker is when you have 2 gut shots to a straight.

For example, if the board is 268 and you have 45, a 3 (23456) or a 7 (45678) will complete a straight for you.

Given board[] and hand[], what’s an efficient algorithm for returning true if you have a double gutter and false if not?

  • 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-17T22:36:11+00:00Added an answer on June 17, 2026 at 10:36 pm

    Here’s an algorithm that can do this with bit vectors.

    First, create a bit vector of 14 bits, say cards (to include low and high ace) and set each bit for each element in hand[] and board[].

    Next, generate 5 pairs of masks (mask, gutter) for the first element in hand[] such that ((cards & mask) ^ gutter)==0 if you have a double gutter. E.g., if one of your cards is 7, the (mask, gutter) pairs would be (assuming MSB->LSB order):

    01111111000000, 01011101000000
    00000001111111, 00000001011101
    00000111111100, 00000101110100
    00001111111000, 00001011101000
    00011111110000, 00010111010000
    

    I.e., you have 2 double gutters with 7 on either end and 3 with 7 in the middle.

    Now, calculate ((cards & mask) ^ gutter) for each of the 5 pairs. If any is 0 you have a double gutter.

    EDIT: turns out you only need to test 5 masks.

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

Sidebar

Related Questions

There are some double fields in the response have values as NaN, however, i
Here is an example of my question: 1) I have an XML files where
I'm just wondering if Specification pattern is pointless, given following example: Say you want
OK, I have a bit of a conundrum. I'll say straight out that I'm
I have problem when want read object with where (double variable) this is my
Double-clicking a TStaticText on a form copies the caption of that TStaticText to the
double? test = true ? null : 1.0; In my book, this is the
double d[10]; int length = 10; memset(d, length * sizeof(double), 0); //or for (int
Double has range more than a 64-bit integer, but its precision is less dues
In double (*foo)[2] what does the [2] represent? And how would I convert an

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.