목록Computer/Coding Test (122)
Machineboy空

문제요약주어진 key에 맞게 원본 문자열을 변형시킨 암호를 출력하라.난이도Medium풀이 포인트random 키 생성아스키 코드 활용문제 이해REVIEW 문제 이해를 한참 못했다.Step 2 그러니까 a: 0 , d:3 의 식으로 암호에 따른 shift가 어떻게 이루어진다는 것인지 이해하는 데 오래 걸렸다.그리고 순환되는 값에는 나머지를 잘 활용해야한다는 것! 또 명심. 뭔가 익숙해진듯, 계속 까먹는 아이디어들이 생긴다.CODEusing System;public class SimpleCipher{ private string key; // 기본 생성자 (랜덤 키 생성) public SimpleCipher() { Random rand = new Random(); ..
문제요약문자열로 이루어진 수식을 계산하여라. 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..

문제요약두 리스트 간의 관계성을 출력하라EqualUnequalSuperlistSublisthttps://exercism.org/tracks/csharp/exercises/sublist Sublist in C# on ExercismCan you solve Sublist in C#? Improve your C# skills with support from our world-class team of mentors.exercism.org난이도Medium풀이 포인트슬라이딩 윈도우REVIEW 슬라이딩 윈도우 개념이 곧바로 떠오르지 않아서 차력으로 풀이했다.내가 구현한 것도 곧 슬라이딩 윈도우긴 하지만 개념을 잊고 사용했으니 반성.그리고, 중복되는 코드를 함수로 빼는 습관도 들이자.우선 되는 게 먼저니까 차력으로 풀..