Python Dictionary Part-2

Q-1.Write a Python program to map two lists into a dictionary. Input: keys = [‘red’, ‘green’, ‘blue’] values = [‘#FF0000′,’#008000’, ‘#0000FF’] Output:{‘red’: ‘#FF0000’, ‘green’: ‘#008000’, ‘blue’: ‘#0000FF’} Python Code: Q-2.Write a Python program to check whether a given key already exists in a dictionary. Input: d = {1: 10, 2: Read more…

Quick Sort

Quick sort is one of the efficient sorting that is based on splitting the array into the smaller ones. Like merge sort, quick sort also uses divide and conquer approach to sort the element. It chooses the pivot element and partition the given array. Time complexity of Quick sort is Read more…

Insert math as
Block
Inline
Additional settings
Formula color
Text color
#333333
Type math using LaTeX
Preview
\({}\)
Nothing to preview
Insert