전체 글
-
잡동사니 팀: 모각코 2주차 2회모임 결과 (24.01.13 / 토요일 / 10시 ~ 13시)카테고리 없음 2024. 1. 13. 13:00
Linked List 데이터를 연속적인 위치에 저장하는 배열과 다르게 각 노드가 데이터와 포인터를 가지고 연결되어 있는 방식으로 데이터를 저장하는 자료구조 Array list보다 검색이 느리지만 삽입, 삭제에 용이해서 삽입, 삭제가 빈번히 일어나는 경우에 주로 사용한다. Collection 프레임워크의 일부이며 java.util 패키지에 소속되어 있어서 import해서 Linked List를 사용할 수 있다. LinkedList l = new LinkedList(); LinkedList li = new LinkedList(); LinkedList li2 = new LinkedList(); LinkedList li3 = new LinkedList(Arrays.asList(1, 2, 3)); LinkedLi..
-
잡동사니 팀: 모각코 1주차 1회모임 결과 (24.01.06 / 토요일 / 10시 ~ 13시)카테고리 없음 2024. 1. 6. 13:01
/* * Stack * LIFO : 마지막에 넣은 걸 먼저 꺼냄 * push : 스택에 넣는 것 * pop : 스택에서 꺼내는 것 * 스택은 배열로 구현하는 것이 좋음 (순차적 추가, 순차적 삭제) * Stack이라는 클래스 존재 * * 스택의 method * boolean empty() : Stack이 비어있는지 반환 * Object peek() : Stack 맨 위에 저장된 객체 반환 * Object pop() : Stack 맨 위에 저장된 객체를 꺼내면서 반환 * Object push(Object item) : Stack에 item 저장 * int search(Object o) : Stack에서 객체(o)를 찾아서 그 위치 반환, 없으면 -1 봔환 (배열은 0부터 시작하지만, 스택은 top부터 1로..
-
아몬드봉봉 팀: 모각코 6주차 6회모임 결과 (22.08.15 / 월요일 / 21시 ~ 24시)카테고리 없음 2022. 8. 15. 23:44
지금까지 공부했던 문법들을 복습하고, 이를 응용하여 풀 수 있는 퀴즈들을 풀어보았다. 복습을 했지만 아직 공부했던 모든 문법들이 빠르게 머릿속에 떠오르지 않았다. 퀴즈를 풀면서 어떤 문법을 이용해야 해결할 수 있을지 고민하고 작성해보며 배웠던 걸 적용하는 역량을 키울 수 있었다. 전체적인 논리를 구상하는 것이 잘 안돼서 퀴즈를 풀면서 많이 막혔다. 세세한 문법들을 작성하는거보다는 전체적인 구상을 떠올리는 걸 중점적으로 연습해야겠다. 아직 배워야할 것이 산더미라는게 막막하지만 더 열심히 해봐야겠다.
-
아몬드봉봉 팀: 모각코 5주차 5회모임 결과 (22.08.08 / 월요일 / 21시 ~ 24시)카테고리 없음 2022. 8. 8. 23:57
5-3. while customer = "토르" index = 5 while index >=1: print("{0},커피가 준비 되었습니다. {1} 번 남았어요".format(customer, index)) index -= 1 if index == 0: print("커피는 폐기처분되었습니다") #무한루프 customer = "아이언맨" index = 1 while True: print("{0},커피가 준비되었습니다. 호출 {1}회".format(customer, index)) index +=1 customer = "토르" person = "Unknown" while person !=customer : #조건에 맞아야 while문을 탈출 print("{0}, 커피가 준비되었습니다".format(custom..
-
아몬드봉봉 팀: 모각코 4주차 4회모임 결과 (22.07.25 / 월요일 / 21시 ~ 24시)카테고리 없음 2022. 7. 25. 23:48
4-3. 튜플 : 내용 변경, 추가 불가 but 리스트보다 속도가 빠르다 괄호와 콤마로 ( , ) menu = ("돈까스", "치스돈까스") #menu.add("생선까스") #튜플은 추가 불가 name = "김종국" age = 20 hobby = "코딩" print(name, age, hobby) #위에처럼 안하고 한번에 튜플로 가능 (name, age, hobby) = ("김종국", 20, "코딩") print(name, age, hobby) 4-4. 집합(set) :중복 x, 순서 x my_set = {1,2,3,3,3} print(my_set) #{1,2,3}출력 (중복 x) java = {"유재석", "김태호", "양세형"} python = set(["유재석", "박명수"]) #{ }로 쓸 수 도..
-
아몬드봉봉 팀: 모각코 3주차 3회모임 결과 (22.07.18 / 월요일 / 21시 ~ 24시)카테고리 없음 2022. 7. 18. 23:46
4-1. 리스트 : 순서를 가지는 객체의 집합 subway1 = 10 subway2 = 20 subway3 =30 subway = [10, 20, 30] print(subway) subway = ["유재석", "조세호", "박명수"] #조세호는 몇 번째 칸에 타고 있는가 print(subway.index("조세호")) #하하가 다음 정류장에서 다음 칸에 탐 : append subway.append("하하") print(subway) #w정형돈이 유재석 조세호 사이에 : insert subway.insert(1, "정형돈") #insert하고 넣고자하는 index를 입력하고 객체 입력 print(subway) #지하철에 있는 사람을 한명씩 뒤에서 꺼내기 : pop print(subway.pop()) pri..
-
아몬드봉봉 팀: 모각코 2주차 2회모임 결과 (22.07.11 / 월요일 / 21시 ~ 24시)카테고리 없음 2022. 7. 11. 23:49
3-1. 문자열 큰따옴표 3개 """ """는 여러줄의 문자열 저장 ex) sentence = """ 안녕하세요, 저는 ___입니다. """ 3-2. 슬라이싱 : 필요한 정보만 잘라쓰기 ex) 주민등록번호가 있을 때, number = " "로 -포함하면 14자리로 이루어짐 몇 번째인지 셀 때 0번째부터 시작 성별을 불러올때 7번째 있는 숫자이므로 number[7]로 쓰면 됨 연도를 불러올때 0,1번째 있는 숫자, number[0:2]로 쓰면 됨 [0:2}>>0번째부터 2번째 직전에 있는 숫자까지 불러오라는 의미, 즉 0번째, 1번째가 나오게 됨 여기서 0 없이 [ :2]로 써도 됨 (앞에 숫자가 없으면 처음부터 불러오라는 의미) 마찬가지로 [2: ]로 쓰면 2번째부터 마지막까지 불러오라는 의미가 됨 뒤에..