분류 전체보기
-
[Python] 주차 요금 계산Algorithm/프로그래머스 2022. 11. 4. 15:38
1. 문제 📚 2. 입출력 예 📋 3. 알고리즘 ✅ 1. dict 형태로 차번호를 키로 두어 정리 2. 출차 시간이 없을 경우 23:59으로 넣어줘야 함 -> 각 정리 후 len()이 다르면 23:59 추가 3. 누적시간 계산 후 주차요금 계산 4. 소스코드 💻 import math # 누적 시간 계산 def cal_time(in_time, out_time): in_time = list(map(int, in_time.split(':'))) # [22, 59] out_time = list(map(int, out_time.split(':'))) # [23, 59] # 시가 더 클 경우 if out_time[0] > in_time[0]: out_time[0] -= 1 out_time[1] += 60 retur..
-
[Python] 단어 변환Algorithm/프로그래머스 2022. 10. 20. 20:13
1. 문제 📚 2. 입출력 예 📋 3. 알고리즘 ✅ 1. 한글자만 다른 단어인지 체크 2. 한번도 방문한 적 없는 단어인지 체크 -> visited에 없다면 한번도 방문한 적 없는 단어 3. 파생되어온 word에 +1 해주기 4. 소스코드 💻 from collections import deque # 한글자 체크 def is_valid(begin, target): count = len(begin) for i in range(count): if begin[i] == target[i]: count -= 1 return count == 1 def solution(begin, target, words): def bfs(word): visited = {word: 0} queue = deque([]) queue.ap..
-
2022 하반기 현대 IT&E 1차 면접 후기취준 2022. 10. 8. 17:27
2022 하반기 현대 IT&E 1차 면접 후기 - 자기 소개 본인 성향 및 기술력 중심 소개 - (자소서기반) 동아리 활동에서 무슨 활동한건지 - 스프링 이 외에 다룰 줄 아는 언어와 데이터베이스 있는지 - (자소서기반) 현재 운영 중인 어플리케이션 개발을 진행 중인지 - (자소서기반) 현재 운영 중인 어플리케이션 수익이 나오는지 - 스프링과 스프링 부트의 차이점 - 자바 가비지 컬렉션에 대해 설명 - 프로세스와 쓰레드에 차이점 - 쿠키와 세션 차이점 - OOP와 AOP 에 대해 간단하게 설명 - Get과 Post의 차이점 - 어디 부서에서 일하고 싶은지 3:3 비대면 면접이고 잡플래닛 면접 후기랑 구글에 쳐보면서 면접 준비하였습니다 딱딱한 분위기는 아니었고, 줌 대기실에 있다가 면접장에 들어가는 형식으..
-
2022 하반기 현대 IT&E AI 면접 및 코테 후기취준 2022. 9. 27. 23:23
현대 IT&E AI 면접 및 코테 후기 나도 면접후기 찾아볼 때 많은 도움이 됐었어서 다른 사람들에게 도움이 될까 싶어 복기 하려고 한다 운이 좋게도 서류합격할 수 있었던 것같댜 처음 서합이라 좀 떨리긴했지만 코테가 준비안됐어서 별 기대없이 봤다 AI면접은 뷰인터라는 곳에서 진행하였고, 시작하기 전에 연습해볼 수 있다 이런거까지 피드백으로 알려줘서 서비스업미소 지으면서 최대한 대답하려고했다 (유튜브에서 찾아보니까 끊김없이 말하는게 중요하다고 해서) 6개의 세트질문(상황-대처-결과) 으로 나오고 마지막엔 갑자기 돌발질문이라면서 다른질문을 던져줬다 이력서에 나올 법한 인성질문들 준비하면 좋을 것 같다! 예를들면 갈등상황을 어떻게 해결했는지 등 코딩테스트는 120분동안 이루어졌고, 화상 캠도 키고 별도로 핸드..
-
[Clean Code] 형식 맞추기Dev/정리 2022. 5. 17. 21:03
포맷팅이 중요한 이유 1. 가독성에 필수적이다 코드를 수월하게 읽어나갈 수 있다. 아마추어처럼 보이지 않는다. 포맷팅으로 인해 코드를 잘못해석해 버그를 발생할 위험을 줄인다. 2. 200라인 협업에서의 대부분의 코드들도 200라인 정도를 유지한다 코드 길이가 200라인을 넘어간다면, 클래스가 여러 개의 일을 하고 있을 수 있다. SRP에 위배된다. 3. 밀접한 개념은 서로 가까이 둔다. 행 묶음은 완결된 생각 하나를 표현하기 때문에 개념은 빈 행으로 분리한다. 변수는 사용되는 위치에서 최대한 가까이 선언한다. Java Class Declarations Class 내부 코드 순서 1. static 변수 public -> protected -> package -> private 순서 2. instance 변..
-
[Clean Code] 함수Dev/정리 2022. 5. 15. 11:24
SOLID (객체지향설계) 객체지향 설계의 5가지 원칙 1. SRP 단일 책임 원칙 한 클래스는 하나의 책임만 가져야 한다. 클래스는 하나의 기능만 가지며, 어떤 변화에 의해 클래스를 변경해야 하는 이유는 오직 하나뿐이여야 한다. SRP 책임이 분명해지기 때문에, 변경에 의한 연쇄작용에서 자유로워 질 수 있다. 가독성 양상과 유지보수가 용이해진다. 실전에는 쉽지 않지만 늘 상기해야 한다. 2. OCP 개방/폐쇄 원칙 소프트웨어 요소는 확장에는 열려 있으나 변경에는 닫혀 있어야 한다. 변경을 위한 비용을 줄이고, 확장을 위한 비용은 가능한 극대화 해야 한다. 요구사항의 변경이나 추가사항이 발생하더라도, 기존 구성요소에는 수정이 일어나지 않고, 기존 구성요소를 쉽게 확장해서 재사용한다. 객체지향의 추상화의 ..
-
[Clean Code] 깨끗한 코드, 의미 있는 이름Dev/정리 2022. 5. 14. 21:22
나쁜 코드란? - 성능이 나쁜 코드 - 의미가 모호한 코드 - 중복된 코드 나쁜 코드가 나쁜 이유 - 깨진 유리창 법칙 나쁜 코드는 깨진 유리창처럼 계속 나쁜 코드가 만들어지도록 한다. - 생산성 저하 나쁜 코드는 생산성을 저하 시킨다. - 새로운 시스템을 만들어야한다 현시스템을 유지보수하며, 대체할 새로운 시스템 개발은 현실적으로 매우 어렵다. 클린 코드 - 성능이 좋은 코드 - 의미가 명확한 코드(= 가독성이 좋은 코드) - 중복이 제거된 코드 -> 명료한 코드 간단한 코드 - 모든 테스트를 통과한다. - 중복이 없다. - 시스템 내 모든 설계 아이디어를 표현한다. - 클래스, 메서드, 함수 등을 최대한 줄인다. 의미 있는 이름 짓기 - 의도를 분명히 밝히기 // 잘못된 변수 int a; String..