Skip to content

27 week5 beakjoon 5397 key logger #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ViGilanteAF
Copy link
Member

@ViGilanteAF ViGilanteAF commented Mar 15, 2023

구현방법

  1. 방향키에 따른 위치 이동
  2. 왼쪽으로 이동시 임시저장후 오른쪽으로 이동할때 붙이기(join)
  3. 배열 2개 선언
  4. 1개는 문자 저장 하면서 현재위치파악 , 1개는 방향키에 따른 문자 처리
  5. if문을 이용해서 방향키에 따라 pop()할거 설정,pop()한문자 는 반대쪽 배열 에 연결
  6. '-' 나오면 그냥 pop()
  7. 마지막에 join으로 두배열 합치기
  8. 문자를 빼서 저장한 공간 은 먼저 빠진 문자가 오른쪽 끝값으로 와야하기 때문에 reverse() 를 해서 붙임

왼쪽으로 이동시 임시저장후 오른쪽으로 이동할때 붙이기(join)
배열 2개 선언
1개는 문자 저장 하면서 현재위치파악
1개는 방향키에 따른 문자 처리

if 조건문을 이용해서 방향키에 따라 pop할거 설정, pop한문자 는 반대쪽 배열 에 연결

'-' 나오면 그냥 pop

마지막에 join으로 두배열 합치기
이때 문자를 빼서 저장한 공간 은 먼저 빠진 문자가 오른쪽 끝값으로 와야하기 때문에 reverse 를 해서 붙임
@ViGilanteAF ViGilanteAF added 자료구조 Data Structure 스택 Stack 연결리스트 Linked List labels Mar 15, 2023
@ViGilanteAF ViGilanteAF requested a review from deipanema March 15, 2023 18:13
@ViGilanteAF ViGilanteAF self-assigned this Mar 15, 2023
@ViGilanteAF ViGilanteAF linked an issue Mar 15, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
스택 Stack 연결리스트 Linked List 자료구조 Data Structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Week5 [BEAKJOON] 5397 Key Logger
1 participant