My journey from Quantum to AI
Some Background Towards the end of my PhD in quantum computing, I started exploring the world of quantum machine learning (QML). Back then, QML was still a very young field (honestly, it still is)...
Some Background Towards the end of my PhD in quantum computing, I started exploring the world of quantum machine learning (QML). Back then, QML was still a very young field (honestly, it still is)...
Question Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. Assume t...
Question Given two integers a and b, return the sum of the two integers without using the operators + and -. Example 1: Input: a = 1, b = 2 Output: 3 Example 2: Input: a = 2, b = 3 Output: 5 ...
Question Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1’s in the binary representation of i. Example 1: Input: n = 2 ...
Question Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array. Example 1: Input: nums = [3,0,1] Output: 2 E...
Question Reverse bits of a given 32 bits signed integer. Example 1: Input: n = 43261596 Output: 964176192 Explanation: Integer Binary 43261596 ...
Question Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note: You must not use any built-in BigInteger li...
Question You are given a stream of points on the X-Y plane. Design an algorithm that: Adds new points from the stream into a data structure. Duplicate points are allowed and should be treated ...
Question Given a positive integer n, write a function that returns the number of set bits in its binary representation (also known as the Hamming weight) Example 1: Input: n = 11 Output: 3 Exp...
Question Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only co...