Geek is learning about functions and calling a function with arguments. He learns that passing can take one of two forms: pass by value or pass by reference.
Geek wishes to add 1 and 2, respectively, to the parameter passed by value and reference. Help Geek in fulfilling his goal.
Example 1:
Input:
a = 1
b = 2
Output:
2 4
Explanation: 1 was passed by value whereas 2 passed by reference.
Example 2:
Input:
a = 10
b = 20
Output: 11 22
Explanation: 10 was passed by value whereas 20 passed by reference.
Constraints:
1 <= a,b <= 10^{5}
Your Task:
You don't need to read input or print anything. Your task is to complete the function passedBy() which takes a and b as input parameters and returns array of two required integers.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

Source: geeksforgeeks | Difficulty: EASY

Starter code: #User function Template for python3



class Solution:

    def passedBy(self, a, b):

        # Code here

Solutions:
class Solution:

	def passedBy(self, a, b):
		x = a + 1
		y = b + 2
		return [x, y]


class Solution:

	def passedBy(self, a, b):
		a = a + 1
		b = b + 2
		return (a, b)


class Solution:

	def passedBy(self, a, b):
		aa = a + 1
		bb = b + 2
		return (aa, bb)


class Solution:

	def passedBy(self, x, y):
		x += 1
		y += 2
		return [x, y]


class Solution:

	def passedBy(self, a, b):
		res = []
		res.append(a + 1)
		res.append(b + 2)
		return res


import math

class Solution:

	def passedBy(self, a, b):
		if 1 <= a <= 10 ** 5 and 1 <= b <= 10 ** 5:
			return (a + 1, b + 2)
		else:
			return -1


import math

class Solution:

	def passedBy(self, a, b):
		if 1 <= a <= 100000 and 1 <= b <= 100000:
			return (a + 1, b + 2)


import math

class Solution:

	def passedBy(self, a, b):
		return (a + 1, b + 2)


class Solution:

	def passedBy(self, a, b):
		ans = []
		ans.append(a + 1)
		ans.append(b + 2)
		return ans


class Solution:

	def passedBy(self, a, b):
		a_ = a + 1
		b_ = b + 2
		return (a_, b_)


class Solution:

	def passedBy(self, a, b):
		l = []
		l.append(a + 1)
		l.append(b + 2)
		return l


class Solution:

	def passedBy(self, a, b):
		s = []
		s.append(a + 1)
		s.append(b + 2)
		return s


class Solution:

	def passedBy(self, a, b):
		res = [0] * 2
		res[0] = a + 1
		res[1] = b + 2
		return res