This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
You have an n episode TV series. You want to watch the episodes in every order possible. | |
What is the least number of episodes that you would have to watch? | |
Overlapping is not allowed. For example, in the case of n=2, watching episode 1, then 2, then 1 again, | |
would not fit the criteria. | |
The orders must be continuous. For example, (1,3,2) does NOT contain the sequence (1,2,3) | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// dependencies | |
// angular 8 | |
// "firebase": "^7.6.1", | |
// "file-saver": "^2.0.2", | |
// "jszip": "^3.2.2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.exceptions.JsonHandleException; | |
import java.util.Iterator; | |
import java.util.Map; | |
public class JsonUtils { | |
private static final ObjectMapper mapper = new ObjectMapper(); |