-
Notifications
You must be signed in to change notification settings - Fork 41
Creative Problems
The real world is much amazing and refreshing. There are many real world scenarios that provides an opportunity to write an algorithm to compute. The code samples of the repository in this section typically are some of the real world problems that can be solved by computer by writing an efficient code. Checkout the problems listed below in alphabetical order.
A text editor uses a data structure called text buffer to load the data of a file in the text editor in editable mode. A user can move the cursor inside the text in left or right direction and can add or delete data at the cursor position, anywhere in the text. Devise an efficient implementation of Text Buffer, which can be used inside a text editor for same purpose. An efficient implementation guarantees that text editor software will not freeze/ hang up while loading and editing the large text files in MBs. #Buffer
Many software in our PC provides an option to undo the most recently performed operation and redo the undone operation. Devise a data structure that abstracts this feature by providing simplified API by assuming the necessary details about the operations being performed. #Checkpoint
Implement an algorithm for a swapping game - 'Humping Dumping'. This game contains an unsorted list of integers; and swaps the entries of the list, such that value of a[n] will be a[a[n]]. #HumpingDumping
Implement an algorithm to print the identical integers found in two given sorted arrays of integers. The expectation is to perform this task at T(N) ~ N for worst case. #Identicals
InfixExpression is an application of stack. An input is given as an infix expression with left parenthesis removed. Implement an algorithm that accepts this input and produce a well parenthesized infix expression as output to the user. #InfixExpression
Josephus problem is a theoretical computer science problem or a counting-out game in which N number of people are waiting in a circle to be executed. The executor will pick every Mth person and executes him. The only one left in the end will survive. #Josephus
Move To Front is strategy used in many real world applications like caching, data compression and other applications where items that have been recently accessed are most likely to be re-accessed. Devise an algorithm that perform this strategy on the characters being read from the input stream. #MoveToFront
An expression is given as input to computer, implement an algorithm that calculates the maximum depth of parenthesis without using Stacks. #parenthesis
RingBuffer is a circular queue data structure used to buffer data generated by a producer and consumed by a consumer in a typical producer-consumer scenario. It is a circular queue which increases the utilization of the data structure with a fixed capacity. #RingBuffer