Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Google Applied CS - Day 1
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Harsh Vakharia
March 28, 2016
Education
0
130
Google Applied CS - Day 1
Day 1:
Anagram (HashSet, HashMap and ArrayList) and Scarne's dice
Harsh Vakharia
March 28, 2016
Tweet
Share
More Decks by Harsh Vakharia
See All by Harsh Vakharia
Google Applied CS - Day 4
harshjv
0
42
Google Applied CS - Day 3
harshjv
0
53
Google Applied CS - Introduction
harshjv
0
41
Other Decks in Education
See All in Education
【ベテランCTOからのメッセージ】AIとか組織とかキャリアとか気になることはあるけどさ、個人の技術力から目を背けないでやっていきましょうよ
netmarkjp
2
2.8k
HTML5 and the Open Web Platform - Lecture 3 - Web Technologies (1019888BNR)
signer
PRO
2
3.2k
卒論の書き方 / Happy Writing
kaityo256
PRO
54
28k
核軍備撤廃に向けた次の大きな一歩─核兵器を先には使わないと核保有国が約束すること
hide2kano
0
240
TeXで変える教育現場
doratex
1
13k
外国籍エンジニアの挑戦・新卒半年後、気づきと成長の物語
hypebeans
0
730
2025-12-11 nakanoshima.dev LT
takesection
0
100
The World That Saved Me: A Story of Community and Gratitude
_hashimo2
3
510
多様なメンター、多様な基準
yasulab
PRO
5
19k
学習指導要領と解説に基づく学習内容の構造化の試み / Course of study Commentary LOD JAET 2025
masao
0
120
JavaScript - Lecture 6 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
AIは若者の成長機会を奪うのか?
frievea
0
180
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
910
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Docker and Python
trallard
47
3.7k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
140
Testing 201, or: Great Expectations
jmmastey
46
8k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
55
The Curse of the Amulet
leimatthew05
1
8.6k
WENDY [Excerpt]
tessaabrams
9
36k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Bash Introduction
62gerente
615
210k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
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?