Question
Write an algorithm in PSEUDOCODE (NOT A PROGRAMMING LANGUAGE CODE LIKE C++) or Nassi-Schneidermann-diagram We encoded a one-part music with positive integers (1..88). The code
Write an algorithm in PSEUDOCODE (NOT A PROGRAMMING LANGUAGE CODE LIKE C++) or Nassi-Schneidermann-diagram
We encoded a one-part music with positive integers (1..88). The code indicates the height of the sound. 0 is the unit long break.
The length of a sound is given as a positive number that specifys the height of that sound + (length-1)*100 (length=1.2,...). E.g. 60-pitch sound lasting up to 2 time units: 60+100=160.
Look for an M-length repeating pattern in N-note music. Enter the repeating pattern with the index of their first occurrence.
EXAMPLE TASK (the solution should be similar like in the example):
Task: On a railway line, a train conductor at each station recorded how many people boarded the train. Enter a station where more people took off than at the previous station, but both had take-offs. (Input, output, prerequisite, algorithm)!
Solution:
Input: n-->N, A-->Nn
Output: Exists-->L, S-->N
Prerequisite: n>2
Name of the algorithm: linear search algorithm
Algorithm (Nassi-Schneidermann-Diagram OR pseudocode, the diagram represents sequences, loops and else-if statements, so pseudocode written solutions are also good!)
i:=2 i=Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started