-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.py
More file actions
79 lines (47 loc) · 1.25 KB
/
code.py
File metadata and controls
79 lines (47 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
for _ in range(int(input())):
n = int(input())
s = input()
if "I" in s:
print("INDIAN")
elif "Y" in s and "N" in s:
print("NOT INDIAN")
else:
print("NOT SURE")
# def minimumSubarrays(ar, n) :
# se = []
# cnt = 1;
# for i in range(n) :
# # Checking if an element already exist in
# # the current sub-array
# if se.count(ar[i]) == 0 :
# # inserting the current element
# se.append(ar[i])
# else :
# cnt += 1
# # clear set for new possible value
# # of subarrays
# se.clear()
# # inserting the current element
# se.append(ar[i])
# print(cnt)
# return cnt
# # Driver Code
# print("Enter array")
# ar = [ 3,1,2,1 ]
# n = len(ar)
# print(minimumSubarrays(ar, n))
# # i = 1
# # j = 2
# # lit = 4
# # for i
# testString = 'Neptuneworld'
# revString = []
# for i in range(len(testString)-1,-1,-1):
# revString.append(testString[i])
# print(''.join(revString))
# # def reverse(testString):
# # if len(testString) == 0:
# # return testString
# # else:
# # return reverse(testString[1:]) + testString[0]
# # print(reverse("NeptuneWorld"))