본문 바로가기

전체 글819

Expressions Matter Task Given three integers a ,b ,c, return the largest number obtained after inserting the following operators and brackets: +, *, () In other words , try every combination of a,b,c with [*+()] , and return the Maximum Obtained Consider an Example : With the numbers are 1, 2 and 3 , here are some ways of placing signs and brackets: 1 * (2 + 3) = 5 1 * 2 * 3 = 6 1 + 2 * 3 = 7 (1 + 2) * 3 = 9 So th.. 2022. 5. 15.
블로그 쓰지 마세요. 블로그 쓰지 마세요. 쓸 거면 자기만족으로 쓰시고 이력서에 넣지 마세요. 인턴 중, 팀 리더님에게 들었던 말이다. 당시에는 개발자로 취업하기 위해서 블로그 운영이 필수라고 생각했었다. 그런 나에게 리더님의 조언은 당혹스러울 수밖에 없었다. 리더님은 '실력 없는 개발자가 쓰는 글'이 오히려 취업에 걸림돌이 될 수 있다고 말했다. 자신은 “얘는 이것도 몰랐구나, 심지어 틀렸네.” 같은 생각을 한다고 했다. 리더님의 말을 듣고 나서 내 블로그를 돌아보았다. 정말 맞는지 틀렸는지도 모를 글들이 대부분이었고, 특히 같은 주제로 나보다 잘 쓴 글들이 인터넷에 차고 넘쳤다. 그렇다면 내가 글을 쓰는 게 의미가 있는 걸까? 내 부족함만 보여주는 게 아닐까? 내 글이 부끄러워졌다. 매일 쓰기 시작하다. 리더님으로부터 조.. 2022. 5. 14.
SQL Basics: Mod Given the following table 'decimals': ** decimals table schema ** id number1 number2 Return a table with one column (mod) which is the output of number1 modulus number2. Solution: SELECT MOD(number1, number2) FROM decimals; MOD is a function that calculates the remainder when number1 and number2 are divided. 2022. 5. 14.
Easy SQL: LowerCase Given a demographics table in the following format: ** demographics table schema ** id name birthday race you need to return the same table where all letters are lowercase in the race column. Solution: SELECT id, name, birthday, LOWER(race) as race FROM demographics; 2022. 5. 13.
SQL Basics: Simple WHERE and ORDER BY For this challenge you need to create a simple SELECT statement that will return all columns from the people table WHERE their age is over 50 people table schema id name age You should return all people fields where their age is over 50 and order by the age descending NOTE: Your solution should use pure SQL. Ruby is used within the test cases to do the actual testing. Solution: SELECT * FROM peo.. 2022. 5. 12.
Sum of numbers from 0 to N Description: We want to generate a function that computes the series starting from 0 and ending until the given number. Example: Input: > 6 Output: 0+1+2+3+4+5+6 = 21 Input: > -15 Output: -15 0 Output: 0=0 Solution: 1. If n is 0, "0=0" is returned. 2. If n is negative, "n 2022. 5. 11.