Exercises/#18 Count and Say
#18

Count and Say

MediumπŸ”€ Strings
70 XP

Problem

The count-and-say sequence starts with '1'. Each term describes the previous term. Generate the nth term.

Examples

n=1: '1'
n=2: '11' (one 1)
n=3: '21' (two 1s)
n=4: '1211' (one 2, then one 1)
n=5: '111221'
stringsimulation
AI Assistantβ€” powered by AI

Unlock hints progressively β€” start gentle, go deeper only if needed.

πŸ’‘

Level 1: Gentle Nudge

A subtle direction

πŸ—ΊοΈ

Level 2: Approach

The algorithm to use

πŸ”

Level 3: Detailed

Step-by-step guidance

18 / 150

Your Solution

⚑ JavaScript

to save progress and use AI features