목록Computer (246)
Machineboy空

Circular Buffer란?생산자와 소비자 처리 사이의 통신에 버퍼를 제공하기 위해 일정량의 기억 장치를 할당한다.그 로직이 원형으로 형성되는 버퍼를 말한다.고정적인 크기: queue with a maximum size, constrained size or capacity, stores data in a fixed-size array원형으로 탐색: continue to loop back over itself in a circular motionCircular Buffer의 작동 방식두 개의 포인터(front, back)로 읽을 위치, 삭제할 위치, 쓸 위치 등을 정한다.storing two pointer to the front and back of the structure버퍼가 모두 차면 가장 오래된..
문제요약문자열로 이루어진 수식을 계산하여라. https://exercism.org/tracks/csharp/exercises/wordy Wordy in C# on ExercismCan you solve Wordy in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Medium풀이 포인트문자열 다루기 : What is ~ ? 꼴의 문자열을 원하는 방식으로 자르기예외 처리수와 수 사이에 연산자가 없을 때 : minus 1 2이상한 문장이 들어왔을 때: what is your name?REVIEW 이런 문제는 차력으로 풀리기 때문에 또 차력으로 풀었다. 문자열이 숫자인지 판단하는 방법으로in..

문제요약괄호쌍이 제대로 닫히는 지 파악하라! https://exercism.org/tracks/csharp/exercises/matching-brackets Matching Brackets in C# on ExercismCan you solve Matching Brackets in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Medium풀이 포인트key - value를 사용하든, 두 괄호쌍의 연결해둘 수 있는 자료구조 사용Stack 아이디어https://machineboy0.tistory.com/177 9012 : 괄호 - stack, 그리디 알고리즘, getline(cin,s)http..
문제요약틱택토 게임의 상태를 반환하라.WinDrawOngoingInvalid https://exercism.org/tracks/csharp/exercises/state-of-tic-tac-toe State of Tic-Tac-Toe in C# on ExercismCan you solve State of Tic-Tac-Toe in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Medium풀이 포인트Invalid 조건 꼼꼼히 따져주기REVIEW Excercism의 허점을 발견했다.분명 완벽하지 않은 풀이인데 주어진 테스트 케이스들만 통과시켰더니 정답풀이라고 해주더라.3*3 칸 밖에 되지 않아..

문제요약주어진 책 가운데, 가장 높은 할인을 적용할 수 있는 조합을 찾아 총액을 도출하라. https://exercism.org/tracks/csharp/exercises/book-store Book Store in C# on ExercismCan you solve Book Store in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Medium풀이 포인트아이디어REVIEW 우선 5개 그룹과 3개 그룹으로 나누어졌을 때보다, 4개와 4개 그룹으로 나누어졌을 때 금액이 더 싸다는 사실을 간과했다.그래서 모든 조합을 다 고려해야 하나.. 머리가 아파져서 모범 풀이를 봤더니5개와 3개가 함께..

문제요약행의 갯수를 입력하면 파스칼 삼각형 규칙에 맞는 행 모음을 출력하라.https://exercism.org/tracks/csharp/exercises/pascals-triangle Pascal's Triangle in C# on ExercismCan you solve Pascal's Triangle in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Medium풀이 포인트파스칼 삼각형 규칙 이해2차원 배열 인덱싱 헷갈리지 않기REVIEW 오랜만에 만난 파스칼 삼각형.0부터 인덱싱 되는 배열과 달리 파스칼 삼각형의 행은 1부터 인덱싱해야해서그것만 주의하면 되는 간단한 문제. Excer..
문제요약유효한 ISBN 문자인지 확인하라. https://exercism.org/tracks/csharp/exercises/isbn-verifier ISBN Verifier in C# on ExercismCan you solve ISBN Verifier in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Medium풀이 포인트문자열 다루기//Splitstring[] strs = str.Split('-');//Replacestring str1 = str.Replace("-","");//Concatstring str2 = string.Concat(strs);문자 숫자 변환char c = '8..

문제요약조건에 맞는 요소를 출력하라. https://exercism.org/tracks/csharp/exercises/strain Strain in C# on ExercismCan you solve Strain in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Easy풀이 포인트델리게이트 이해IEnumerable 형 특징 이해REVIEW 우선 파라미터에 들어가 있는 델리게이트 함수의 이름을 처음에 발견하지 못해 헤맸다.그리고 아직 IEnumerable형의 lazy 실행에 관해 익숙하지 않아서,List를 생성하고 조건에 맞는 값을 넣은 뒤 출력하는 방식으로 구현했는데,IEnumerable..