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
私たちはなんでテストするんだっけ? Ver.東北IT物産展2026 in 会津若松
camel_404
3
220
Introduction - Lecture 1 - Human-Computer Interaction (1023841ANR)
signer
PRO
0
3.5k
学習者データを「見る」:外国語教師のためのデータの入力、分析、解釈方法
uranoken
0
440
Dronegeografía innovación didáctica y fotogrametría 3D para la enseñanza de la geografía local y la ciudadaniía activa
juanmartin2026
0
39k
生成AIとの付き合い方/ How to work with AI
kaityo256
PRO
3
880
Carbohydrates: Classification, Structure & Chemical Properties
pawan_pharm
0
330
AWS Academy プログラムのご紹介
hiragahh
0
110
1人 × AI、1か月でここまで作れる ー 数年前の外注換算3.8〜7.4億円・241〜379人月分の作業を、AI費用 約10万円・31日で
frievea
0
580
Introduction - Lecture 1 - Web Technologies (1019888BNR)
signer
PRO
0
6.6k
2026年度秋学期 統計学 第2回 統計資料の収集と読み方 (2026. 10. 6)
akiraasano
PRO
0
270
セキュリティ担当がいない中小医療機関を院外のRISSはどう支えるべきか / How External RISS Can Help Small Medical Institutions
eller86
1
230
AIの力を100%引き出すために
frievea
0
610
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The SEO Collaboration Effect
kristinabergwall1
1
590
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
How to Ace a Technical Interview
jacobian
280
24k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
First, design no harm
axbom
PRO
2
1.3k
The Curious Case for Waylosing
cassininazir
1
570
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?