I've got a scenario where I need to compare two JSON files and override one if the values are different. These JSONs also include arrays (i.e. [)My approach is to traverse one JSON to dictionary O(n), and then traverse the second JSON against the dictionary (also O(n)??). There by getting 2O(n) ~ O(n).Am I day dreaming? Or is there more efficient approach for such problem (or possibly something similar)?EDIT:Both files have the same structure, format and order. The only difference is key value.I can share the code I've now, if you feel this is appropriate forum.
Comparing Two JSON Files In O(n)
python;json;complexity;dictionary