Question: A common feature request on Pinterest is the ability to merge two boards into one. This feature is often useful when two boards have very

A common feature request on Pinterest is the ability to merge two boards into one. This feature is often useful when two boards have very similar content, or a second board has been mistakenly created. Task Implement the function merge two boards,which accepts two board ids, board_id_1 and board_id_2 and returns the list of pin ids that compose the merged board. The merged board should be created according to the following rules: The merged board contains pins from both boards, in alternating form. That is to say, if board one has pin ids I'1', '2' and board two has pin ids I'3', 4',the merged board should be '1', '3', .If a pin on a board has an image url that is the same of a pin from earlier in the two boards, discard this pin, and add the next unique pin from that board onto the response. You can see the image data of a pin by asking for the image field when requesting the pins of a board. A common feature request on Pinterest is the ability to merge two boards into one. This feature is often useful when two boards have very similar content, or a second board has been mistakenly created. Task Implement the function merge two boards,which accepts two board ids, board_id_1 and board_id_2 and returns the list of pin ids that compose the merged board. The merged board should be created according to the following rules: The merged board contains pins from both boards, in alternating form. That is to say, if board one has pin ids I'1', '2' and board two has pin ids I'3', 4',the merged board should be '1', '3', .If a pin on a board has an image url that is the same of a pin from earlier in the two boards, discard this pin, and add the next unique pin from that board onto the response. You can see the image data of a pin by asking for the image field when requesting the pins of a board
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
