hackerrank23 Hacker rank Caesar Cipher https://www.hackerrank.com/challenges/caesar-cipher-1 Caesar Cipher | HackerRank Encrypt a string by rotating the alphabets by a fixed value in the string. www.hackerrank.com 1 2 3 4 5 6 7 8 9 10 11 12 def caesarCipher(s, k): # Write your code here answer = '' k = k% 26 for i in s: if i.isalpha(): if ord(i)+k>122 or (ord(i)90) : i = chr(ord(i) + k-26) else: i = chr(ord(i) + k) answer+=i return(a.. 2022. 11. 10. Hacker rank Super Reduced String 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 def superReducedString(s): # Write your code here my_stack=[] for i in s: if len(my_stack) == 0 or my_stack[-1]!=i: my_stack.append(i) elif my_stack[-1]==i: my_stack.pop() answer = ''.join(my_stack) if answer == '': answer = 'Empty String' return answer if __name__ == '__ma cs https://www.hackerrank.com/challenges/reduced-string/problem Super Reduced String | .. 2022. 11. 8. hacker rank The Report 1 2 3 4 5 6 7 8 select case when g.grade >=8 then s.name else null end, g.grade, s.marks from students s join grades g on s.marks between g.min_mark and g.max_mark where s.marks > 8 order by g.grade desc, s.name, s.marks; cs 2022. 3. 29. Hacker Rank Top Competitors 1 2 3 4 5 6 7 8 9 10 SELECT H.hacker_id, H.name FROM Submissions S INNER JOIN Challenges C ON S.challenge_id = C.challenge_id INNER JOIN Difficulty D ON C.difficulty_level = D.difficulty_level INNER JOIN Hackers H ON S.hacker_id = H.hacker_id WHERE S.score = D.score AND C.difficulty_level = D.difficulty_level GROUP BY H.hacker_id, H.name HAVING COUNT(H.hacker_id) > 1 ORDER BY COUNT(H.hacker_id) .. 2022. 3. 29. Hacker rank Weather Observation Station 20 1 2 3 4 5 6 /* Enter your query here. Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error. */ select round(median(lat_n),4) from station Colored by Color Scripter cs 2022. 3. 29. hacker rank Weather Observation Station 19 1 2 3 4 5 6 /* Enter your query here. Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error. */ select round(sqrt(power(min(LAT_N)-max(LAT_N), 2)+power(min(LONG_W)-max(LONG_W), 2)), 4) from station Colored by Color Scripter cs 2022. 3. 29. Hackerrank Weather Observation Station 18 1 2 3 4 5 6 /* Enter your query here. Please append a semicolon ";" at the end of the query and enter your query in a single line to avoid error. */ select round((max(lat_n)-min(lat_n))+(max(long_w)-min(long_w)),4) from station Colored by Color Scripter cs 2022. 3. 29. Hackerrank Revising Aggregations - The Sum Function 1 2 3 select sum(population) from city where district='California' cs 2021. 10. 21. Hacker rank Weather Observation Station 12 1 2 3 4 5 select distinct city from station where left(city,1) not in ('a','e','i','o','u') and right(city,1) not in ('a','e','i','o','u') cs 2021. 10. 21. Hacker rank Weather Observation Station 11 1 2 3 4 5 select distinct city from station where left(city,1) not in ('a','e','i','o','u') or right(city,1) not in ('a','e','i','o','u') cs 2021. 10. 21. Hacker rank Weather Observation Station 10 1 2 3 select distinct city from station where right(city,1) not in ('a','e','i','o','u') cs 2021. 10. 20. Hacker rank Weather Observation Station 9 1 2 3 select distinct city from station where left(city,1) not in ('a','e','i','o','u') cs 2021. 10. 20. 이전 1 2 다음