31
31
# num2=num2/10
32
32
# return str(num2)
33
33
34
+ ################*******@Ziyodev*********######################
35
+
36
+ #------------------- 344. Reverse String -----------------#
37
+ # start | 23:11
38
+ # end | 23:44
39
+
40
+ # class Solution(object):
41
+ # def reverseString(self, s):
42
+ # """
43
+ # :type s: List[str]
44
+ # :rtype: None Do not return anything, modify s in-place instead.
45
+ # """
46
+ # sana = 0
47
+ # list_len = (len(s) / 2)
48
+ # if list_len %2 != 0:
49
+ # list_len - 1
50
+ # while sana < list_len:
51
+ # head = s[sana]
52
+ # s[sana] = s[-1-sana]
53
+ # s[-1-sana] = head
54
+ # sana += 1
55
+ # return s
56
+
57
+ # s = ["s","a","l","o","m"]
58
+ # test = Solution()
59
+ # answer = test.reverseString(s)
60
+ # print(answer)
61
+
62
+ ######################### compact solution ##########################
63
+
64
+ # class Solution(object):
65
+ # def reverseString(self, s):
66
+ # """
67
+ # :type s: List[str]
68
+ # :rtype: None Do not return anything, modify s in-place instead.
69
+ # """
70
+ # l=[]
71
+ # l.append(s.reverse())
72
+ # return l
73
+
74
+
34
75
################*******@Ziyodev*********######################
0 commit comments