Amazon | Phone Interview | Difference in Data Streams
Anonymous User
1662

Given two streaming data, stream 1 is the data that you have and stream 2 is the incoming data.
Compare the streams and give the output, which elements are added in stream 2 that are not present in stream 1. Which elements are deleted from Stream 1 i.e., not present in stream 2.

Additional information found after having a dialogue:

  • The data type of the streams can be of your choice, lists, tuple, etc.
  • Both the streams are sorted and there can be duplicate values in both the streams.
  • The length of both streams may or may not be the same.
Comments (4)