No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
PlaygroundGlobal
AmazonInterviewReducePrice.cpp
Amazon_BitManipulation.c
AppleEvenOddRearrange.cpp
AppleInterview.c
AppleInterviewGridWalk.cpp
AppleProblem.cpp
Apple_Interview_July_2017
Apple_TCP_Window_Impl.cpp
DoublyLinkedList.c
Dropbox_RedBue
Dropbox_RedBue.cpp
FBInterview.c
FB_Interview.cpp
FB_intervew.c
Genesis_Practice.cpp
GoogleInterview.c
LeapMotionProblem.c
LinkedIn_interview.cpp
LotteryTicketProblem.py
MerakiInterview.cpp
Nvidia.cpp
PostFixEvaluation.cpp
ProducerConsumer.cpp
PureStorageInterview.c
PureStorageInterview.cpp
PureStoragePhone.cpp
PureStorage_Interview.c
README
Sorting.c
Square_interview.c
StackFindMax.cpp
bitvector.cpp
bitvector.h
hashTable.cpp
hashtable.h
list.cpp
list.h
stringReverSal.cpp
strtok.cpp
tp.cpp
tripleByte.cpp

README

PROBLEM:
Winning Ticket!

Your favorite uncle, Morty, is crazy about the lottery and even crazier about how he picks his “lucky” numbers. And even though his “never fail” strategy has yet to succeed, Uncle Morty doesn't let that get him down.

Every week he searches through the Sunday newspaper to find a string of digits that might be potential lottery picks. But this week the newspaper has moved to a new electronic format, and instead of a comfortable pile of papers, Uncle Morty receives a text file with the stories.

Help your Uncle find his lotto picks. Given a large series of number strings, return each that might be suitable for a lottery ticket pick. Note that a valid lottery ticket must have 7 unique numbers between 1 and 59, digits must be used in order, and every digit must be used.

For example, given the following strings:

[ “1”, “42". “100848", “4938532894754”, “1234567”, “472844278465445”]

Your function should return:

4938532894754 -> 49 38 53 28 9 47 54 
1234567 -> 1 2 3 4 5 6 7


SOLUTION:

To run the script on Linux command prompt, do the following:
 $ python LotteryTicketProblem.py

 The list of strings to be tested is stored in  "lottery_list" variable on the
 first line of the program. If you would like to find out whether other strings 
 are valid lottery picks, please append those to the "lottery_list".
 Save and run the script again.