Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Google Applied CS - Day 1
Search
Harsh Vakharia
March 28, 2016
Education
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Google Applied CS - Day 1
Day 1:
Anagram (HashSet, HashMap and ArrayList) and Scarne's dice
Harsh Vakharia
March 28, 2016
More Decks by Harsh Vakharia
See All by Harsh Vakharia
Google Applied CS - Day 4
harshjv
0
48
Google Applied CS - Day 3
harshjv
0
58
Google Applied CS - Introduction
harshjv
0
46
Other Decks in Education
See All in Education
20260908_ターゲットとスコープを決める発表法
masakiokuda
1
140
Web Application Frameworks - Lecture 3 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
[2026後期火5] 論理学(京都大学文学部 後期 第1回)「名前はあるのに、誰なのかわからない」
yatabe
0
150
新入社員を「あの子」と呼ばない運動 -PBL その前に- / Stop Calling New Hires "Kids"
aokiplayer
2
930
The Dirty Dozen: 12 gala mistakes you don’t know you’re making
auctria
PRO
0
140
人間のために、人間と共に働く時代の終わりの始まり
frievea
0
230
SANG PENCIPTA BERBICARA (01ABSG-Q4-2026)
ssmedikasda
0
470
Sanapilvet opetuksessa
matleenalaakso
1
36k
検定資格の価値 ~実はすごいよQC検定~
bunnchinn3
0
260
Book-keeping
bvr7352
0
130
25-26 CBT Library top items
cbtlibrary
0
360
2026年度秋学期 統計学 第2回 統計資料の収集と読み方 (2026. 10. 6)
akiraasano
PRO
0
270
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
3.2k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Code Reviewing Like a Champion
maltzj
529
40k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
540
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
540
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
Transcript
GOOGLE'S APPLIED CS WITH ANDROID DAY 1
ANAGRAMS
WHAT IS AN ANAGRAM? An anagram is a word formed
by rearranging the letters of another word. — Wikipedia
EXAMPLE Cinema is an anagram of iceman.
MECHANICS 1. Provide user a word from the dictionary. 2.
The user tries to create as many words as possible that contain all the letters of the given word plus one additional letter. 3. The user can give up and see the words that they did not guess.
CATCH The addition of extra letter at the beginning or
the end without reordering the other letters is not valid.
MEANING If the game picks the word 'ore' as a
starter, the user might guess 'rose' or 'zero' but not 'sore'. i.e. 1. rose ✅ 2. s(ore) ❌
STARTER CODE
ANAGRAMDICTIONARY'S CONSTRUCTOR WHAT IS NEEDED? 1. Word validation 2. Random
word selection 3. Get word's anagrams 4. Get words by length (ext)
WORD VALIDATION Set<String> wordSet = new HashSet<>(); ACCESS TIME: O(1)
RANDOM WORD SELECTION ArrayList<String> wordList = new ArrayList<>(); RANDOM ACCESS
TIME: O(1)
GET WORD'S ANAGRAMS Map<String, ArrayList<String>> lettersToWord = new HashMap<>(); ACCESS
TIME: O(1)
GET WORDS BY LENGTH Map<Integer, ArrayList<String>> sizeToWords = new HashMap<>();
SCARNE'S DICE
RULES 1. if they roll a 1, score no points
and lose their turn 2. if they roll a 2 to 6: ▸ add the rolled value to their points ▸ choose to either reroll or keep their score and end their turn
STARTER CODE
THIS IS IT FOR TODAY
ANY DOUBTS?