Python | Dump a Dict to JSON File

Dumping Dict to JSON

A Dict in Python is a Data Structure which looks like {“Apple” : 10, “Banana”: 54, “Grapes”: 34} what if you want to store this dictionary into a JSON file. Best method to do this is to use JSON Python Package do not worry you don’t need to install this explicitly as it’s already installed … Read more

Code for Binary Search Algorithm (PHP)

What does Binary Search Algorithm do? Given a sorted array of n elements, write a function to search for the index of a given element (target). Process of working of Binary Search Algorithm? Search for the array by dividing the array in half repeatedly. Initially consider the actual array and pick the element at the … Read more