Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
720 views
in Online Assessments by Expert (34,270 points) | 720 views

2 Answers

0 like 0 dislike
import sys
def solution(A):
	result = set()
	for nums in A:
		nums = (2 - len(str(nums))) * "0" + str(nums)
			if nums in result:
				result.add (nums[::-1])
			else:
				result.add (nums)
	return len(result)
by Expert (34,270 points)
0 like 0 dislike
Given a list of numbers include the number in the list, and if that number is present in the list include the reversed number in the list. Return the length of the list after adding the elements to the list.
by Expert (34,270 points)