Validating Postal Codes

Problem Statement The task is to write a function that validates whether a given postal code string meets certain conditions such as being a six-digit number with specific digits at specific positions and having a certain sum of digits. Link:¬†HackerRank Complexity: Hard Solution: The solution to this problem involves the use of regular expressions. We define …

Validating Postal Codes Read More »

Building Interactive Visualisations Using Plotly

Plotly is a powerful data visualization library that allows you to create interactive charts and graphs. With Plotly, you can create everything from simple line charts to complex 3D visualisations with ease. In this article, we’ll cover the basics of creating interactive visualizations using Plotly, and we’ll provide examples to help you get started. Getting …

Building Interactive Visualisations Using Plotly Read More »

Data Analysis and Visualization in Python

Data analysis and data visualisation are two closely related activities in the field of data science. Getting insights from data using statistical and computational methods is part of data analysis. This process may involve cleaning and transforming the data, and then performing various statistical tests and modeling techniques to extract insights. Once the data analysis …

Data Analysis and Visualization in Python Read More »

Binary Search (#704)

Problem Statement Link: LeetCode Complexity: Easy Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log n) runtime complexity. Example 1: Input: nums = [-1,0,3,5,9,12], target = 9 Output: 4 Explanation: 9 exists in nums and its …

Binary Search (#704) Read More »

Median of Two Sorted Arrays

Problem Statement Link: LeetCode Complexity: Hard Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example 1: Input: nums1 = [1,3], nums2 = [2] Output: 2.00000 Explanation: merged array = [1,2,3] and median is 2. Example 2: Input: nums1 = [1,2], nums2 = [3,4] Output: …

Median of Two Sorted Arrays Read More »

Scroll to Top