Jan 95 Challenge
 Volume Number: 11 Issue Number: 1 Column Tag: Programmer’s Challenge

# Programmer’s Challenge

By Mike Scanlin, Mountain View, CA

Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.

## Poker Hand Evaluator

This month’s challenge was suggested by Chris Derossi (Mountain View, CA). The goal is to compare two poker hands and determine which is higher. Your routine will be given two hands of 7 cards each. It will have to make the best 5 card hand it can from each and return the two 5-card hands as well as which is higher.

Here is how poker hands rank (from lowest to highest, with an example of each in parentheses):

one pair (5, 5, *, *, *)

two pair (5, 5, 8, 8, *)

three of a kind (5, 5, 5, *, *)

straight (5, 6, 7, 8, 9)

flush (club, club, club, club, club)

full house (5, 5, 5, 8, 8)

four of a kind (5, 5, 5, 5, *)

straight flush (5, 6, 7, 8, 9; all clubs)

five of a kind (5, 5, 5, 5, wildCard)

The prototype of the function you write is:

```typedef unsigned char Card;

typedef SevenCardHand {
Card cards[7];
} SevenCardHand;

typedef FiveCardHand {
Card cards[5];
} FiveCardHand;

short
ComparePokerHands(hand1Ptr, hand2Ptr,
best1Ptr, best2Ptr,
wildCardAllowed, wildCard,
straightsAndFlushesValid,
privateDataPtr)
SevenCardHand  *hand1Ptr;
SevenCardHand  *hand2Ptr;
FiveCardHand*best1Ptr;
FiveCardHand*best2Ptr;
Boolean  wildCardAllowed;
Card     wildCard;
Boolean  straightsAndFlushesValid;
void    *privateDataPtr;

```

A Card is a byte value (unsigned char) from 0 to 51 where 0 represents the 2 of clubs, 9 is the jack of clubs, 12 is the ace of clubs, 13 is the 2 of diamonds, 26 is the 2 of hearts, 39 is the 2 of spades and 51 is the ace of spades.

The inputs are two SevenCardHands (from the same deck; you won’t get duplicate Cards). Your routine should make the highest hand possible with 5 of the 7 cards and store the resulting hand in the two FiveCardHands. It should then return one of the following values: -1 if hand 1 is higher than hand 2, 0 if the hands are tied and 1 if hand 2 is higher than hand 1. Hands can be tied because suit counts for nothing when ranking hands. Aces can be high or low (whichever makes the resulting hand better).

WildCardAllowed is true if wild cards are allowed and false if not. If they are allowed then wildCard will be the card that is wild, from 0 to 12. All suits of that care are wild. For example, if wildCard is 4 then all 6’s are wild (Card values 4, 17, 30 and 43).

StraightsAndFlushesValid is true if straights and flushes are to be counted in the ranking. If it is false then straights and flushes do not count for anything (they are low hands).

PrivateDataPtr is the value returned by your Init routine, which is not timed, whose prototype is:

```void *
ComparePokerHandsInit(wildCardAllowed, wildCard,
straightsAndFlushesValid)
Boolean wildCardAllowed;
Card    wildCard;
Boolean straightsAndFlushesValid;

```

You can allocate up to 1MB of memory in your Init routine (in case you want to generate some lookup tables). The pointer you return will be passed to your ComparePokerHands routine.

E-mail me if you have any questions. Have fun.

## Two Months Ago Winner

I had to disqualify two of the eight entries I received for the Huffman Decoding challenge because of incorrect results. Congratulations to Challenge Champion Bob Boonstra (Westford, MA) for earning his fifth win. The top four entrants each optimized their solutions for those cases where there was extra memory available. Greg McKaskle (Austin, TX) had a very strong showing for the extra memory case but his very-little-extra-memory case code came in 3rd place, preventing him from winning overall.

Here are the times and code sizes for each entry. Numbers in parens after a person’s name indicate how many times that person has finished in the top 5 places of all previous Programmer Challenges, not including this one:

```Name 256K time8K time  code
Bob Boonstra (12)12422308
John Schlack (1) 28551470
Wolfgang Thaller (age 13) 40929    1090
Allen Stenger (7)103 103  440
Peter Hance 1211 1211188
```

From reading the winning code you may notice that even a master such as Bob has picked up at least one trick from studying previous Challenge winners. He chose to borrow the ‘switch-do-while’ idea from Bill Karsh’s SwapBytes entry (a neat trick, indeed). Glad to see it. After all, this column is meant to be educational (by teaching tricks by example) as much as it is a contest.

I’ve been getting more requests than usual to have access to the current Challenge before the magazine hits the streets (especially from people outside the US). Well, this being the 90’s and all, the latest Challenge is available on-line the day the magazines go out in the mail. Check out p. 2 for where to look on each of the online services.

Hope that helps. Here is Bob’s winning solution:

## HuffmanDecode

```Copyright (c) 1994  J Robert Boonstra
```

## Problem Statement

Given a symbol table, decompress the Huffman encoded input stream and return the number of decompressed bytes.

## Solution Strategy

Use the untimed initialization routine to create a tree structure corresponding to the sym values in the symbol table. In the timed decode routine, traverse the tree. When a leaf node is encountered, output the corresponding value, and begin traversing the tree again from the root.

We determine whether there is enough storage for the tree structure by trying to construct it. If there is not enough storage, set up a simple table of pointers into the symbol table based on symbol length. This is not especially efficient, but it produce correct results.

```
#pragma options(honor_register,!assign_registers)

TYPEDEFS and DEFINES
#define ulong  unsigned long
#define ushort unsigned short
#define uchar  unsigned char

/*
* SymElem is the data structure provided in the problem
* definition.  Symbols are sorted by symLength and within
* length by sym.
*/
typedef struct SymElem {
unsigned short symLength;
unsigned short sym;
unsigned short value;
} SymElem, *SymElemPtr;

/*
* DecodeNode is a node in the tree used to decode the
* input stream.  The zeroP and oneP values are offsets
* into the tree corresponding to reading a 0 or a 1 given
* the prior input.  Note that the zeroP field is used at a
* leaf node (identified by a zero in the oneP field) to
* represent the SymElem value.  The offsets are stored
* relative to the current tree position for efficiency
* in calculating the address.  Note also that 16 bits are
* enough to access the max available 256K (64K nodes of
* 4 bytes each).  In cases where only 64K storage is used,
* the offsets are premultiplied by sizeof(DecodeNode) to
* squeeze out a little additional efficiency at some small
* expense in code size.
*/
typedef struct DecodeNode {
ushort zeroP;   /* index of right tree node, or value */
ushort oneP;    /* index of left tree node            */
} DecodeNode;

typedef struct SymDecode {
SymElemPtr symP;
ushort numEntries;
ushort align;
} SymDecode;

PROTOTYPES

void *HuffmanDecodeInit(SymElemPtr theSymTable,
unsigned short numSymElems,
unsigned long maxMemoryUsage);

unsigned long HuffmanDecode(SymElemPtr theSymTable,
unsigned short numSymElems, char *bitsPtr,
unsigned long numBits, unsigned short *outputPtr,
void * privateHuffDataPtr);

#define kUnused (ushort)0xFFFF
#define kTerminalNode 0
#define InitializeNewNode()                                \
{                                                          \
if ((void *)pFree > (void *)pMax)                      \
goto notEnoughStorage;                               \
pFree->oneP = kUnused;                                 \
pFree->zeroP = kUnused;                                \
}

#define kGMode 0
#define kSEP 4
#define kGlobalStorageSize (kSEP+16*sizeof(SymDecode))

#define gMode *(short *)((char *)privateHuffDataPtr+kGMode)

HuffmanDecodeInit

void *HuffmanDecodeInit(SymElemPtr theSymTable,
unsigned short numSymElems,
unsigned long maxMemoryUsage)
{
register DecodeNode *p;
register DecodeNode *pOrig;
register DecodeNode *pFree;
register ulong pMax;
register ushort i;
register ulong nodeNum=1;
SymDecode *theSymElemPtr;
SymElemPtr sP;
void *privateHuffDataPtr;
ulong count;
ushort sym,maxLng,maxDiff=0;

/*
* Allocate entire memory allocation, return if allocation
* fails.
*/
if (0 == (p=privateHuffDataPtr = NewPtr(maxMemoryUsage)))
return 0;
gMode = 0;

/*
* Initialize SymElem pointers
*/
theSymElemPtr = (SymDecode *)((char *)privateHuffDataPtr +
kSEP);
sP = theSymTable;
count = 0;
sym = theSymTable->sym;
for (i=1; i<=16; ++i) {
ushort oldCount;
oldCount = count;
theSymElemPtr->symP = sP;
while ((sP->symLength==i) && (count<numSymElems))
{ ++count;  ++sP; }
theSymElemPtr++->numEntries = count-oldCount;
}

/*
* Initialize tree pointers.
*/
p = (DecodeNode *)(kGlobalStorageSize +
(char *)privateHuffDataPtr);
pOrig = pFree = p;
pMax = (ulong)((char *)p + maxMemoryUsage -
(kGlobalStorageSize + sizeof(DecodeNode)) );

/*
* Initialize root of tree.
*/
InitializeNewNode();
++pFree;

/*
* Loop over symbol table elements.
* Insert each symbol into the tree.
* Tree is traversed by following the zeroP/oneP indices
* corresponding to the bits of the sym field in the symbol
* table, from most significant to least significant bit.
* Leaves of the tree are indicated by oneP==kTerminalNode.
* The zeroP field of leaf nodes contains the decompressed
* output for the bit sequence that led to the leaf when
* the oneP field is kTerminalNode.
*/
for (i=0; i<numSymElems; ++i) {
SymElemPtr sP;
register short sym;
ushort value;
register ushort symLength;
sP = theSymTable+i;
sym = sP->sym;
value = sP->value;
symLength = sP->symLength;
p = pOrig;

/*
* Loop over bits in the sym field.
*/
sym <<= (16-symLength);
do {
if (0 > sym ) {
/*
* Process a 1, allocate a new node if one is needed.
*/
if (kUnused == p->oneP) {
InitializeNewNode();
p->oneP = (pFree-p);
if (p->oneP > maxDiff) maxDiff = p->oneP;
p = pFree++;
} else {
p += p->oneP;
}
} else {
/*
* Process a 0, allocate a new node if one is needed.
* Note that since we reuse the zeroP field later to contain
* the value to be output, this code depends on having a
* correct (i.e. deterministic) Huffman encoding in
* theSymTable, and will crash spectacularly otherwise.
*/
if (kUnused == p->zeroP) {
InitializeNewNode();
p->zeroP = (pFree-p);
if (p->zeroP > maxDiff) maxDiff = p->zeroP;
p = pFree++;
} else {
p += p->zeroP;
}
}
sym <<= 1;
} while (--symLength);

/*
* Insert value into leaf node.
*/
p->zeroP = value;
p->oneP = kTerminalNode;
maxLng = sP->symLength;
}

/*
* Premultiply offsets by node size for "fast" mode.
*/
if ( (1<<14)-1 > maxDiff  ) {
gMode = 1;
p = pFree;
do {
--p;
if (p->oneP != kTerminalNode) {
if (p->zeroP != kUnused)
p->zeroP *= sizeof(DecodeNode);
if (p->oneP != kUnused)
p->oneP *= sizeof(DecodeNode);
}
} while (p>pOrig);
}
goto done;

notEnoughStorage:
/*
* If we do not have enough storage for the tree, fall back
* on a slower technique requiring less storage.
*/
gMode = 2;
done:
return privateHuffDataPtr;
}

macro ProcessBit

{ register ulong temp;                                     \
if (!(theChar & mask)) temp = tP->zeroP;                 \
else                   temp = oneP;                      \
temp *= sizeof(DecodeNode);                              \
t += temp;                                               \
if (kTerminalNode == (oneP = tP->oneP))  {               \
*outP++ =  tP->zeroP;                                  \
t = (char *)decode_tree;                               \
oneP = tP->oneP;                                       \
}                                                        \
}

macro ProcessBitFast

{ register ulong temp;                                     \
if (!(theChar & mask)) temp = tP->zeroP;                 \
else                   temp = oneP;                      \
t += temp;                                               \
if (kTerminalNode == (oneP = tP->oneP))  {               \
*outP++ =  tP->zeroP;                                  \
t = (char *)decode_tree;                               \
oneP = tP->oneP;                                       \
}                                                        \
}

macro ProcessBitSlow

{ register ushort temp;                                    \
if (!(theChar & mask)) temp = tP->zeroP;                 \
else                   temp = oneP;                      \
if (temp != kUnused) {                                   \
temp *= sizeof(DecodeNode);                            \
t += temp;                                             \
if (kTerminalNode == (oneP = tP->oneP))  {             \
*outP++ =  tP->zeroP;                                \
t = (char *)decode_tree;                             \
oneP = tP->oneP;                                     \
theSym=0;  theSymLng=0;                              \
bitStart = bitNum-1;                                 \
next;                                                \
}                                                      \
} else {                                                 \
theBitNum = bitNum;                                    \
goto overflow;                                         \
}                                                        \
}

HuffmanDecode

unsigned long HuffmanDecode(SymElemPtr theSymTable,
unsigned short numSymElems, char *bitsPtr,
unsigned long numBits, unsigned short *outputPtr,
void * privateHuffDataPtr)
{
register char *bitsP = bitsPtr;
register ushort *outP = outputPtr;
register char *t = (char *)privateHuffDataPtr +
kGlobalStorageSize;
#define tP ((DecodeNode *)t)

register uchar theChar;
register ushort oneP;
register ulong count;
ushort state;

oneP = ((DecodeNode *)t)[0].oneP;
state = 0;
/*
* Set up loop count to loop over complete input bytes, and
* jump past the switch statement into the loop.
* The billKarsh-inspired switch--do subterfuge allows us
* to optimize the main loop and still reuse code for the
* leftover bits at the end.
*/
count = numBits>>3;
/*
* Select case.
*/
{
register ushort mode;
if (0 == (mode = *(ushort *)(t - kGlobalStorageSize)) )
goto start;
if (1 == mode) goto startFast;
goto slowest;
}

/*
* CASE 0
*
* This section processes the case where the decode tree
* fit into available memory, but the offsets are in units
* of sizeof(long).
* We jump to doLeftOverBits at the end to pick up the last byte.
*/
doLeftOverBits:
state = 1;
count = 1;                  /* Only one byte to process */
theChar =  *bitsP;          /* Fetch last byte */
theChar>>=(8-numBits);      /* Shift bits into position */
switch (numBits) {
register ulong decode_tree;
start:
decode_tree = (ulong)t;
do {
bit0:
/*
* Loop over the bytes in the input stream, decoding as
* we go.  Rather than loop over the bits in each byte,
* the bit loop is unrolled for efficiency.
*/
theChar =  *bitsP++;  /* get input byte */
case 0: ProcessBit(0x80,8);     /* process 0th bit */
case 7: ProcessBit(0x40,7);     /* process 1st bit */
case 6: ProcessBit(0x20,6);     /* process 2nd bit */
case 5: ProcessBit(0x10,5);     /* process 3rd bit */
case 4: ProcessBit(0x08,4);     /* process 4th bit */
case 3: ProcessBit(0x04,3);     /* process 5th bit */
case 2: ProcessBit(0x02,2);     /* process 6th bit */
case 1: ProcessBit(0x01,1);     /* process 7th bit */
} while (--count);
}
/*
* Make another pass to process the bits in the last byte.
*/
if (state==0) {
if (numBits &= 7) goto doLeftOverBits;
}
goto done;

/*
* CASE 1
*
* This section processes the case where the decode tree
* fit into available memory, but the offsets are in units
* of bytes.
* We jump to doLeftOverBitsFast at the end to pick up the
* last byte.
*/
doLeftOverBitsFast:
state = 1;
count = 1;                  /* Only one byte to process */
theChar =  *bitsP;          /* Fetch last byte */
theChar>>=(8-numBits);      /* Shift bits into position */
switch (numBits) {
register ulong decode_tree;
startFast:
decode_tree = (ulong)t;
do {
bit0Fast:
/*
* Loop over the bytes in the input stream, decoding as
* we go.  Rather than loop over the bits in each byte,
* the bit loop is unrolled for efficiency.
*/
theChar =  *bitsP++;  /* get input byte */
case 0: ProcessBitFast(0x80,8); /* process 0th bit */
case 7: ProcessBitFast(0x40,7); /* process 1st bit */
case 6: ProcessBitFast(0x20,6); /* process 2nd bit */
case 5: ProcessBitFast(0x10,5); /* process 3rd bit */
case 4: ProcessBitFast(0x08,4); /* process 4th bit */
case 3: ProcessBitFast(0x04,3); /* process 5th bit */
case 2: ProcessBitFast(0x02,2); /* process 6th bit */
case 1: ProcessBitFast(0x01,1); /* process 7th bit */
} while (--count);
}
/*
* Make another pass to process the bits in the last byte.
*/
if (state==0) {
if (numBits &= 7) goto doLeftOverBitsFast;
}
goto done;

/*
* CASE 2
*   This code handles the case where the entire decode
*   tree did not fit into the private storage.  In this
*   case we use the portion of the tree that did fit, but
*   we may have to linearly search the SymTable for the
*   longer symbols.
*/
slowest:
{
SymDecode *theSymElemPtr;
SymElemPtr sP;
register ushort theSym;
theSymLng = 0;
theSym = 0;
goto startSlow;
doLeftOverBitsSlow:
state = 1;
count = 1;                /* Only one byte to process */
theChar =  *bitsP;        /* Fetch last byte */
theChar>>=(8-numBits);    /* Shift bits into position */
switch (numBits) {
ulong decode_tree;
startSlow:
decode_tree = (ulong)t;
do {
theChar =  *bitsP++;  /* get input byte */
bitStart = 8;
slow0:                                /* process 0th bit */
case 0: ProcessBitSlow(0x80,8,0x7F,);
slow7:                                /* process 1st bit */
case 7: ProcessBitSlow(0x40,7,0x3F,);
slow6:                                /* process 2nd bit */
case 6: ProcessBitSlow(0x20,6,0x1F,);
slow5:                                /* process 3rd bit */
case 5: ProcessBitSlow(0x10,5,0x0F,);
slow4:                                /* process 4th bit */
case 4: ProcessBitSlow(0x08,4,0x07,);
slow3:                                /* process 5th bit */
case 3: ProcessBitSlow(0x04,3,0x03,);
slow2:                                /* process 6th bit */
case 2: ProcessBitSlow(0x02,2,0x01,);
slow1:                                /* process 7th bit */
case 1: ProcessBitSlow(0x01,1,0x00,continue);

theSym <<= bitStart;
theSym |= theChar;
theSymLng += bitStart;

continue; /* continue with next char */
overflow:
theSym <<= bitStart-theBitNum;
theSym |= (theChar>>theBitNum);
theSymLng += bitStart-theBitNum;

theChar &= (1<<theBitNum)-1;
bitStart = theBitNum;

/* search SymTab for theSym */
saveCount = count;
theSymElemPtr = (SymDecode *)
((char *)privateHuffDataPtr + kSEP);
theSymElemPtr += theSymLng-1;
search:
sP = theSymElemPtr->symP;
count = theSymElemPtr->numEntries;
if (count) do {
if (sP->sym < theSym) goto nextSP;
if (sP->sym > theSym) goto noSym;
*outP++ = sP->value;
if (state != 0) goto done;
theSymLng = 0;
theSym = 0;
theChar &= ((1<<theBitNum)-1);
bitStart = theBitNum;
count = saveCount;
t = (char *)decode_tree;
oneP = tP->oneP;
next:   switch (theBitNum) {
case 8:
case 0:  count = saveCount;
goto nextChar0;
case 1:  goto slow1;
case 2:  goto slow2;
case 3:  goto slow3;
case 4:  goto slow4;
case 5:  goto slow5;
case 6:  goto slow6;
case 7:  goto slow7;
nextSP: ++sP;
} /* end switch */
} while (--count);
noSym:if (0 == theBitNum) {
if (0==--saveCount) {
lastChar:
if (state!=0) goto done;
state=1;
theChar = *bitsP;
count = 1;
theBitNum = 8;  theMask = 0x80;
} else {
theChar =  *bitsP++;  /* get input byte */
theBitNum = 8;  theMask = 0x80;
}
}
theSym<<=1;
--theBitNum;
++theSymElemPtr;
goto search;
nextChar:
theSym <<= 8;
theSym |= theChar;
theSymLng += 8;
nextChar0: ;
} while (--count);
if ((state==0) && (numBits &= 7))
goto doLeftOverBitsSlow;
}
}
done:
return (char *)outP-(char *)outputPtr;
}
```

Community Search:
MacTech Search:

Capto 1.2.9 - \$29.99
Capto (was Voila) is an easy-to-use app that takes capturing, recording, video and image editing to the next level. With an intelligent file manager and quick sharing options, Capto is perfect for... Read more
Opera 51.0.2830.40 - High-performance We...
Opera is a fast and secure browser trusted by millions of users. With the intuitive interface, Speed Dial and visual bookmarks for organizing favorite sites, news feature with fresh, relevant content... Read more
GarageSale 7.0.13 - Create outstanding e...
GarageSale is a slick, full-featured client application for the eBay online auction system. Create and manage your auctions with ease. With GarageSale, you can create, edit, track, and manage... Read more
1Password is a password manager that uniquely brings you both security and convenience. It is the only program that provides anti-phishing protection and goes beyond password management by adding Web... Read more
Evernote 7.0.1 - Create searchable notes...
Evernote allows you to easily capture information in any environment using whatever device or platform you find most convenient, and makes this information accessible and searchable at anytime, from... Read more
MacUpdate Desktop 6.2.0 - \$20.00
MacUpdate Desktop brings seamless 1-click app installs and version updates to your Mac. With a free MacUpdate account and MacUpdate Desktop 6, Mac users can now install almost any Mac app on... Read more
HoudahSpot is a versatile desktop search tool. Use HoudahSpot to locate hard-to-find files and keep frequently used files within reach. HoudahSpot will immediately feel familiar. It works just the... Read more
EtreCheck 4.0.4 - For troubleshooting yo...
EtreCheck is an app that displays the important details of your system configuration and allow you to copy that information to the Clipboard. It is meant to be used with Apple Support Communities to... Read more
WhatsApp 0.2.8361 - Desktop client for W...
WhatsApp is the desktop client for WhatsApp Messenger, a cross-platform mobile messaging app which allows you to exchange messages without having to pay for SMS. WhatsApp Messenger is available for... Read more
iClock is a menu-bar replacement for Apple's default clock but with 100x features. Have your Apple or Google calendar in the menubar. Have the day, date, and time in different fonts and colors in the... Read more

## Latest Forum Discussions

The best games like Florence
Florence is a great little game about relationships that we absolutely adored. The only problem with it is it's over a little too soon. If you want some other games with some emotional range like Florence, check out these suggestions: [Read more] | Read more »
Angry Birds Champions adds cash prizes t...
Collaborating with developer Rovio Entertainment, GSN Games has released a twist on the Angry Birds formula. Angry Birds Champions features the same bird-flinging gameplay, but now you can catapult Red and co for cash. | Read more »
Around the Empire: What have you missed...
148Apps is part of a family. A big family of sites that make sure you're always up to date with all the portable gaming news. Just like a real family, I guess. I don't know, my mum never told me anything about Candy Crush to be fair. [Read more] | Read more »
The Battle of Polytopia Guide - Tips for...
The addition of multiplayer to The Battle of Polytopia has catapulted the game from a fun enough time waster to a fully-fledged 4X experience on your phone. We've been playing quite a few matches over the past week or so, and we've put together a... | Read more »
All the best games on sale for iPhone an...
Hi there, and welcome to our round up of all the best games that are on sale for iOS at the moment. It's not a vintage week in terms of numbers, but I'm pretty sure that every single one of these is worth picking up if you haven't already played... | Read more »
Disc Drivin' 2 Guide - Tips for the...
We're all still playing quite a bit of Disc Drivin' 2 over here at 148Apps, and we've gotten pretty good at it. Now that we've spent some more time with the game and unlocked more powerups, check out some of these more advanced tips: | Read more »
Alto's Odyssey Guide - How to Tackl...
Alto’s Odyssey is a completely stunning and serene runner, but it can also be a bit tricky. Check out these to try and keep your cool while playing this endless runner: Don’t focus too much on tasks [Read more] | Read more »
Here's everything you need to know...
Alto's Odyssey is a really, really good game. If you don't believe me, you should definitely check out our review by clicking this link right here. It takes the ideas from the original Alto's Adventure, then subtly builds on them, creating... | Read more »
Alto's Odyssey (Games)
Alto's Odyssey 1.0.1 Device: iOS Universal Category: Games Price: \$4.99, Version: 1.0.1 (iTunes) Description: Just beyond the horizon sits a majestic desert, vast and unexplored. Join Alto and his friends and set off on an endless... | Read more »
Vainglory 5v5: Everything you need to kn...

## Price Scanner via MacPrices.net

Use your Apple Education discount and save up...
Purchase a new Mac using Apple’s Education discount, and take up to \$400 off MSRP. All teachers, students, and staff of any educational institution with a .edu email address qualify for the discount... Read more
Apple Canada offers 2017 21″ and 27″ iMacs fo...
Canadian shoppers can save up to \$470 on the purchase of a 2017 current-generation 21″ or 27″ iMac with Certified Refurbished models at Apple Canada. Apple’s refurbished prices are the lowest... Read more
9″ iPads available online at Walmart for \$50...
Walmart has 9.7″ Apple iPads on sale for \$50 off MSRP for a limited time. Sale prices are for online orders only, in-store prices may vary: – 9″ 32GB iPad: \$279.99 \$50 off – 9″ 128GB iPad: \$379.99 \$... Read more
15″ Apple MacBook Pros, Certified Refurbished...
Save \$360-\$420 on the purchase of a 2017 15″ MacBook Pro with Certified Refurbished models at Apple. Apple’s refurbished prices are the lowest available for each model from any reseller. An standard... Read more
Amazon restocks MacBook Pros with models avai...
Amazon has restocked 15″ and 13″ Apple MacBook Pros with models on sale for up to \$251 off MSRP. Shipping is free. Note that stock of some Macs may come and go (and some sell out quickly), so check... Read more
Lowest price of the year: 15″ 2.8GHz Apple Ma...
Amazon has the 2017 Space Gray 15″ 2.8GHz MacBook Pro on sale today for \$251 off MSRP. Shipping is free: – 15″ 2.8GHz Touch Bar MacBook Pro Space Gray (MPTR2LL/A): \$2148, \$251 off MSRP Their price is... Read more
Apple restocks full line of Certified Refurbi...
Apple has restocked a full line of Apple Certified Refurbished 2017 13″ MacBook Pros for \$200-\$300 off MSRP. A standard Apple one-year warranty is included with each MacBook, and shipping is free.... Read more
Lowest sale price available for 13″ 1.8GHz Ma...
Focus Camera has the 2017 13″ 1.8GHz/128GB Apple MacBook Air on sale today for \$829 including free shipping. Their price is \$170 off MSRP, and it’s the lowest price available for a current 13″... Read more
21-inch 2.3GHz iMac on sale for \$999, \$100 of...
B&H Photo has the 2017 21″ 2.3GHz iMac (MMQA2LL/A) in stock and on sale for \$999 including free shipping plus NY & NJ tax only. Their price is \$100 off MSRP. Read more
Apple refurbished Mac minis in stock again st...
Apple has restocked Certified Refurbished Mac minis starting at \$419. Apple’s one-year warranty is included with each mini, and shipping is free: – 1.4GHz Mac mini: \$419 \$80 off MSRP – 2.6GHz Mac... Read more

## Jobs Board

*Apple* Retail - Multiple Positions - Apple,...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Retail - Multiple Positions - Apple,...
Job Description:SalesSpecialist - Retail Customer Service and SalesTransform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Retail - Multiple Positions - Apple,...
Job Description: Sales Specialist - Retail Customer Service and Sales Transform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more
*Apple* Solutions Consultant - Apple (United...
# Apple Solutions Consultant Job Number: 113523441 Orange, CA, California, United States Posted: 21-Feb-2018 Weekly Hours: 40.00 **Job Summary** Are you passionate Read more
*Apple* Retail - Multiple Positions - Apple,...
Job Description:SalesSpecialist - Retail Customer Service and SalesTransform Apple Store visitors into loyal Apple customers. When customers enter the store, Read more