FastPrepTodo Task Manager Operations
Problems/Todo Task Manager Operations

Todo Task Manager Operations

Cisco logoCisco● MediumFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Cisco onsite interview. The report describes a todo manager built with a class, with create, read, update and delete, and three statuses. Our version takes a finite list of operations. We chose the fields, the result strings, and what happens on errors, so practice runs the same way every time.

Process a finite ordered sequence of todo-task operations. Each task has a unique integer ID, a title, and one status: new, pending, or resolved.

  • ["CREATE", id, title] creates a task with status new and returns OK, or EXISTS if the ID is already present.
  • ["READ", id] returns id|title|status, or NOT_FOUND.
  • ["UPDATE_TITLE", id, title] and ["UPDATE_STATUS", id, status] return OK on success or NOT_FOUND. An invalid status returns INVALID_STATUS without changing the task.
  • ["DELETE", id] removes the task and returns OK, or NOT_FOUND.

Return one result for every operation in input order.

Function

manageTasks(operations: String[][]) → String[]

Examples

Example 1

operations = [["CREATE","7","Ship release"],["READ","7"],["UPDATE_STATUS","7","pending"],["READ","7"],["DELETE","7"],["READ","7"]]return = ["OK","7|Ship release|new","OK","7|Ship release|pending","OK","NOT_FOUND"]

The task is created, updated, read in both states, deleted, and then no longer exists.

Example 2

operations = [["CREATE","1","Draft"],["CREATE","1","Again"],["UPDATE_STATUS","1","closed"],["READ","1"]]return = ["OK","EXISTS","INVALID_STATUS","1|Draft|new"]

A duplicate create and an invalid status leave the existing task unchanged.

Constraints

  • 1 <= operations.length <= 10^5.
  • Task IDs are non-negative 32-bit integers encoded as decimal strings.
  • Titles are non-empty and do not contain |.
  • Every operation has the exact arity described above.

More Cisco interview questions

  • Find the Duplicate Number Without Modifying the ArrayONSITE INTERVIEW · Seen Sep 2026
  • Check if a String Is a PalindromePHONE SCREEN · Seen Nov 2026
  • Find Unique ElementsPHONE SCREEN · Seen Nov 2026
  • First Letter to Appear TwicePHONE SCREEN · Seen Nov 2026
  • Middle of a Linked ListPHONE SCREEN · Seen Nov 2026
  • Reverse a Linked ListPHONE SCREEN · Seen Nov 2026
  • Reverse a StringPHONE SCREEN · Seen Nov 2026
  • Valid ParenthesesPHONE SCREEN · Seen Nov 2026
  • K-Step Bit Flip with RetentionPHONE SCREEN · Seen Nov 2026
  • Longest Non-Repeating SubstringPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • Random Dasher Set OperationsDoorDash · ONSITE INTERVIEWDoorDash interview questions
  • LRU Cache for Query ResultsAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • In-Memory Filesystem CommandsPerplexity AI · PHONE SCREEN · ONSITE INTERVIEWPerplexity AI interview questions
  • Rectangle Point Coverage CountsOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • In-Memory Vault File SystemHarvey · ONSITE INTERVIEWHarvey interview questions
  • Hash Map with Separate ChainingApplied Intuition · ONSITE INTERVIEWApplied Intuition interview questions
  • Camel CardsRippling · PHONE SCREEN · ONSITE INTERVIEWRippling interview questions
  • Design Authentication ManagerOracle · ONSITE INTERVIEWOracle interview questions
  • Hash Map with TTLNike, Inc. · ONSITE INTERVIEWNike, Inc. interview questions
  • Least Recently Used CacheMicrosoft · OA · PHONE SCREEN · ONSITE INTERVIEWMicrosoft interview questions
All Cisco interview questionsSee Cisco hiring insights
Saved
class Solution {
    public String[] manageTasks(String[][] operations) {
        // Write your code here.
    }
}
Checking account…