ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 210401 TIL
    TIL/202104 2021. 4. 1. 23:54

    1.SQL in goormedu

    symmetric pairs by hackerrank

    SELECT f1.x, f1.y
    FROM  functions as f1
         INNER JOIN functions as f2 ON f1.x = f2.y AND f1.y = f2.x (two join conditions make sense.)
    WHERE f1.x < f1.y -- this is point
    
    UNION
    
    SELECT x, y
    FROM functions
    WHERE x = y
    GROUP BY x, y  (‘GROUP BY’ works even if we input two columns at the same time.)
    HAVING count(*) = 2
    ORDER BY x  (‘ORDER BY’ can be used at the last sentence of UNION query)
    
    

    output

     

     

    2.English

    <speaking review>

    It looks like they didn’t know what real camping is

    They didn’t seem to expect what could happen if they are on the way to the campsite

    additionally/in addition to/moreover/furthermore, they gave their food to a bear (also is not accepted)

    <reading - cracking the tech career>

    [bookmark]

    P44

    “At a start-up, office managers do everything under the sun.” Kwok explains. “As the company grows, you can begin to specialize in an area like HR. Couple that with an additional night course or two in HR, and all of a sudden you’re the perfect candidate for a full-time HR-position.”

     

    3.algorithm

    mathmatics

    def stoi(s, n):
    ret = 0
    l = len(s)
    
    for i in range(l): ret += int(s[i] * n**(l-i-1)
    return ret
    
    
    *easier way
    
    1 * 10 **2 + 2 * 10 ** 1 + 3 * 10 **0
    -> 8times
    
    (((0 * 10 +1) * 10) + 2) * 10 + 3
    -> 6times

     

    'TIL > 202104' 카테고리의 다른 글

    210416 TIL  (0) 2021.04.16
    210413 TIL  (0) 2021.04.14
    210406 TIL  (0) 2021.04.07
    210405 TIL  (0) 2021.04.06
    210402 TIL  (0) 2021.04.02
Designed by Tistory.