{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

S-07 - The heuristic of the Second Trick can probably be...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
* The heuristic of the Second Trick can probably be improved. I invite * anyone willing to improve it to do so. */ /* Use the accompanying unproto perl script to remove the ANSI-style * prototypes, for those of you who have K&R compilers. */ #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> #include <setjmp.h> /* Before compiling, make sure Quad and MASK_BITS are set properly. For best * results, make Quad the largest integer size supported on your machine. * So if your machine has long longs, make Quad an unsigned long long. * (I called it Quad because on most machines, the largest integer size * supported is a four-byte unsigned long.) * * If you need to be able to anagram larger phrases, increase MAX_QUADS. * If you increase it beyond 4, you'll have to add a few more loop unrolling * steps to FindAnagram. */ typedef unsigned long Quad; /* for building our bit mask */ #define MASK_BITS 32 /* number of bits in a Quad */ #define MAX_QUADS 2 /* controls largest phrase */ #define MAXWORDS 26000 /* dictionary length */
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern