Add Binary
Given two binary strings a and b, return their sum as a binary string. LeetCode Problem - 67 import java.math.BigInteger; class Solution { // Method to add two binary strings public String addBinary(String a, String b) { // Convert t...

Search for a command to run...
Articles tagged with #binary
Given two binary strings a and b, return their sum as a binary string. LeetCode Problem - 67 import java.math.BigInteger; class Solution { // Method to add two binary strings public String addBinary(String a, String b) { // Convert t...

Given a binary array nums and an integer goal, return the number of non-empty subarrays with a sum goal. A subarray is a contiguous part of the array. LeetCode Problem - 930 import java.util.HashMap; import java.util.Map; class Solution { // Met...

Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You must write an algorithm with O(log n) runtime complexity. LeetCode Pro...
