

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Introduction to Data Structures
incomplete
2: What Are Data Structures?
incomplete
3: Lists
incomplete
4: Lists Quiz
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Starting with this chapter, we're going to focus on how we can store and organize data in a way that allows for even better algorithms.
Data structures are just organizational tools that allow for more advanced algorithms. Some examples:
Stacks: Last in, first out.
Queues: First in, first out.
Linked Lists: A chain of nodes, efficient for inserts and deletes.
Binary Trees: A tree where each node has up to two children.
Red Black Trees: A self-balancing binary tree using colors.
Hashmaps: A data structure that maps keys to values.
Tries: A tree used for storing and searching words efficiently.
Graphs: A collection of nodes connected by edges.
Implement the count_marketers function. It should accept a list of strings (job titles) and return the number of users who've set their title to "marketer". LockedIn users sometimes use different casing in their titles, so make sure to account for that.
count = count_marketers(["programmer", "marketer", "doctor", "marketer"])
print(count)
# prints "2"The .lower() method can be used to convert a string to lowercase.