Azure Boards for tracking - Time & Space Complexity
When using Azure Boards to track work items, it's important to understand how the time to process tasks grows as you add more items.
We want to know how the number of operations changes when the number of work items increases.
Analyze the time complexity of the following operation sequence.
// Create a new work item
az boards work-item create --title "New Task" --type Task
// List all work items in a project
az boards query --wiql "Select [System.Id] From WorkItems"
// Update each work item status
foreach (var id in workItemIds) {
az boards work-item update --id $id --fields "System.State=Done"
}
This sequence creates one work item, lists all existing work items, then updates each work item status one by one.
Identify the API calls, resource provisioning, data transfers that repeat.
- Primary operation: Updating each work item status.
- How many times: Once for each work item in the list.
As the number of work items grows, the number of update operations grows at the same rate.
| Input Size (n) | Approx. Api Calls/Operations |
|---|---|
| 10 | 10 update calls |
| 100 | 100 update calls |
| 1000 | 1000 update calls |
Pattern observation: The number of update calls increases directly with the number of work items.
Time Complexity: O(n)
This means the time to update all work items grows linearly as you add more items.
[X] Wrong: "Updating all work items takes the same time no matter how many items there are."
[OK] Correct: Each work item update is a separate operation, so more items mean more updates and more time.
Understanding how operations scale with input size helps you design efficient tracking and automation in cloud projects.
"What if we batch update multiple work items in a single API call? How would the time complexity change?"