Opening your workspace…
Workspace/Coding room
Opening your workspace…
During your night shift at Freddy Fazbear’s Pizza, the camera monitor shows which animatronics moved between checks. Given the camera room count and each animatronic’s room before and after the check, count how many ended up in a different room.
5, [1,3,5], [1,2,5]Output1Only the animatronic that was in room 3 ended up in a different room.
3, [1,2,3,1], [2,3,1,2]Output4Every animatronic changed rooms, so the count is 4.
Compare the before and after room for each animatronic at the same index.
function solve(room_count, before_rooms, after_rooms) { // Write your solution here. }
Tab inserts two spaces. Shift+Tab outdents. Use the arrow keys and Tab to choose a suggestion. Press Escape, then Tab, to leave the editor. Press Control or Command with apostrophe to run samples or with Enter to submit.