
This is an introduction to the dictionaries course.
By the end of this course, you will:
Understand how dictionaries work and when to use them
Apply dictionary techniques to solve interview-style problems
Build confidence in using Swift dictionaries for real-world tasks
In this tutorial, you'll learn how to group custom objects by an attribute using Swift dictionaries. We'll walk through a real-world example using a custom Fighter struct and show how to organize fighters by the organizations they belong to. This lesson is ideal for those looking to deepen their understanding of dictionaries, loops, and data transformation in Swift—especially for interview preparation or iOS development practice.
Topics covered:
Custom struct definitions
Nested loops and data extraction
Dictionary initialization and value appending
Practical grouping logic for real-world data
By the end of the video, you'll be able to confidently group custom Swift objects by any of their attributes. Perfect for junior and intermediate Swift developers.
Scenario:
You're building a simple grade tracking system for a classroom app. Each student can have multiple test scores. Your task is to compute the average score for each student using a dictionary.
Scenario:
You're developing an app for a small retail business to track product inventory. Each product has a name and a quantity in stock. Sometimes, multiple shipments arrive with the same product name, and you need to aggregate the quantities.
Scenario:
You're now tracking inventory not just by product name, but also by the warehouse location where each shipment is received. You need to organize the data so that you can view the inventory per product for each warehouse.
Write a function called countUserActivity that takes an array of UserAction and returns a dictionary of type [String: Int].
Each key should be a username, and the value should be the total number of actions they performed.
Scenario:
You're managing student performance data across multiple subjects. Each score entry contains a student's name, the subject, and their score on a test. Your goal is to identify the top-scoring student in each subject.
Scenario:
You're managing student performance data across multiple subjects. Each score entry contains a student's name, the subject, and their score on a test. Your goal is to identify the top-scoring student in each subject.
You're analyzing system logs from a distributed application. Each log entry includes the name of the server where the event occurred and a list of error codes encountered. Your task is to create a dictionary that maps each error code to the list of servers where it occurred, without duplicates.
You're analyzing system logs from a distributed application. Each log entry includes the name of the server where the event occurred and a list of error codes encountered. Your task is to create a dictionary that maps each error code to the list of servers where it occurred, without duplicates. This is the coding demonstration.
Scenario:
You're managing match results for a local sports league. Each game has a home team, away team, and the final scores. Your goal is to generate a leaderboard showing total points per team, where:
A win gives 3 points
A draw gives 1 point
A loss gives 0 points
Scenario:
You're managing match results for a local sports league. Each game has a home team, away team, and the final scores. Your goal is to generate a leaderboard showing total points per team, where:
A win gives 3 points
A draw gives 1 point
A loss gives 0 points
I will be coding the solution to this problem.
You’re working with sales data from a team of salespeople. Each sale record includes the salesperson's name and the sale amount. Your goal is to find the highest single sale made by each person.
You’re working with sales data from a team of salespeople. Each sale record includes the salesperson's name and the sale amount. Your goal is to find the highest single sale made by each person. The coding of the solution provides and explanation of the code.
You're analyzing user reactions on a social media platform. Each reaction is tied to a specific post and includes the type of reaction (like "like", "love", "angry", etc.). Your task is to determine the most common reaction for each post.
You're analyzing user reactions on a social media platform. Each reaction is tied to a specific post and includes the type of reaction (like "like", "love", "angry", etc.). Your task is to determine the most common reaction for each post. Now let's demonstrate coding the solution.
You're analyzing emergency response data. Each response record includes the name of the responder, the city where they responded, and how many minutes they took to arrive. Your task is to determine the fastest responder for each city — that is, the person who responded in the shortest time.
You're analyzing emergency response data. Each response record includes the name of the responder, the city where they responded, and how many minutes they took to arrive. Your task is to determine the fastest responder for each city — that is, the person who responded in the shortest time. Demonstrating coding the solution.
You're analyzing student progress data for an online course platform. Each student log records a student’s name, the course name, and whether they completed it. Your goal is to build a report showing, for each course, which students have completed it.
You're analyzing student progress data for an online course platform. Each student log records a student’s name, the course name, and whether they completed it. Your goal is to build a report showing, for each course, which students have completed it.
You’re building an analytics feature for an e-commerce app. Each user review includes the product name and a rating from 1 to 5. Your task is to calculate the average rating for each product and return the results as a dictionary.
You’re building an analytics feature for an e-commerce app. Each user review includes the product name and a rating from 1 to 5. Your task is to calculate the average rating for each product and return the results as a dictionary.
You're analyzing user session data from a mobile app. Each session record includes the username and the number of minutes they were active. Your task is to find the total active time per user but only include users who had at least one session over 10 minutes (to filter out quick logins or pings).
You're analyzing user session data from a mobile app. Each session record includes the username and the number of minutes they were active. Your task is to find the total active time per user but only include users who had at least one session over 10 minutes (to filter out quick logins or pings).
You're building a feature for a blogging platform to analyze vocabulary usage. Each blog post includes the author's name and the post content. Your task is to count how often each word appears per author (ignoring punctuation and case sensitivity).
You're building a feature for a blogging platform to analyze vocabulary usage. Each blog post includes the author's name and the post content. Your task is to count how often each word appears per author (ignoring punctuation and case sensitivity).
You're analyzing messages from a chat system. Each message record includes the username and the message content. Your task is to determine the longest message sent by each user.
You're analyzing messages from a chat system. Each message record includes the username and the message content. Your task is to determine the longest message sent by each user.
You’re working with personal finance data. Each expense record includes the user's name, a date string, and the amount spent. Your goal is to compute the total amount spent per user per day.
You’re working with personal finance data. Each expense record includes the user's name, a date string, and the amount spent. Your goal is to compute the total amount spent per user per day.
Dictionaries are one of the most essential tools in Swift, yet most iOS development courses barely scratch the surface. They show up in passing, but few—if any—courses are dedicated to mastering them. This course is different.
Decoding Dictionaries: From Basics to Interview-Ready is the only course on the market that puts Swift dictionaries front and center, showing you how to manipulate, transform, and solve real problems with them. In the world of iOS development, being able to group, filter, restructure, and decode dictionary-based data is not just helpful—it’s critical.
Most online courses are built around what sells. This course is built around what you actually need to know to succeed as a mobile developer. If you’re serious about building clean, efficient, and interview-ready Swift code, this course gives you the skills that hiring managers quietly expect but few bootcamps or tutorials ever teach.
What You’ll Learn:
Creating and safely accessing key-value data
Grouping, merging, mapping, and filtering dictionary content
Building dictionary-powered algorithms for real-world use
Solving common interview-style coding challenges using dictionaries
Parsing and decoding JSON into dictionaries using Codable
Using dictionaries to manage view state, model data, and more
Coding Challenges Include:
Grouping articles by tags
Counting word frequency from text input
Reversing a dictionary’s key-value pairs
Filtering based on nested keys and optional values
Building lookup tables dynamically
Custom decoding of nested JSON dictionaries
By the end of this course, you’ll have the fluency and confidence to use dictionaries not just to pass coding challenges—but to build production-ready features and think like a professional Swift developer.