Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 362 Bytes

Day 62.md

File metadata and controls

18 lines (13 loc) · 362 Bytes

Day 62

Link: https://x.com/kom_senapati/status/1764119229521961261?s=20

Approach:

  • Converted both binary strings to int and then added them and converted to binary string and returned

Code:

class Solution:
	# @param A : string
	# @param B : string
	# @return a strings
	def addBinary(self, A, B):
		return bin(int(A, 2)+int(B, 2))[2:]