Giter VIP home page Giter VIP logo

codingstudy201701's Introduction

코딩 알고리즘 스터디 2017년 - 01반 (Java/Spring since 2017-01)

언어 : JAVA 1.8

codingstudy201701's People

Contributors

softage0 avatar minnamgoong avatar tjcky avatar

Stargazers

Park Miso avatar  avatar

Watchers

 avatar James Cloos avatar  avatar Park Miso avatar

codingstudy201701's Issues

즐거운 파티

화이트씨는 다재다능한 사람입니다. 그래서 그에게는 친구가 많습니다. 하지만 불행하게도 그의 친구들은 다재다능하지 않습니다. 각각의 친구는 2가지 주제에만 관심이 있고 다른 주제로 이야기하는 것을 싫어합니다. 그래서 파티를 개최할 때마다 모두가 즐겁게 파티를 보내려면 어떤 친구를 초대할지가 큰 문제입니다. 화이트씨는 그 동안의 경험으로 초대된 친구 모두가 공통의 흥미 있는 화제가 있을 때 파티를 즐긴다는 것을 알았습니다.

문자열 배열 first, second가 주어집니다. 화이트씨의 index 번째 친구가 흥미 있는 화제는 first[index] 와 second[index] 입니다. 즐거운 파티가 되려면 초대할 수 있는 친구는 최대 몇 명인지 리턴하세요.

정의 : 클래스와 함수 정의
class : InterestingParty
Method : public int bestInvitation(String[] first, String[] second)

제약조건
first : 1 부터 50개의 요소를 갖는 배열입니다.
second : first 와 같은 크기의 배열입니다.
first, second 공통 : 각 요소는 1~5개의 문자이며, 각 문자는 영어 소문자입니다. index 번째 요소 first[index] 와 second[index] 의 내용은 다릅니다.

입력 / 출력 데이터
[1]
first = ['fishing', 'gardening', 'swimming', 'fishing']
second = ['hunting', 'fishing', 'fishing', 'biting']
return : 4

[2]
first = ['variety', 'diversity', 'loquacity', 'courtesy']
second = ['talking', 'speaking', 'discussion', 'meeting']
return : 1

[3]
first = ['snakes', 'programming', 'cobra', 'monty']
second = ['python', 'python', 'anaconda', 'python']
return : 3

[4]
first = ['t', 'o', 'p', 'c', 'o', 'd', 'e', 'r', 's', 'i', 'n', 'g', 'l', 'e', 'r', 'o', 'u', 'n', 'd', 'm', 'a', 't', 'c', 'h', 'f', 'o', 'u', 'r', 'n', 'i']
second = ['n', 'e', 'f', 'o', 'u', 'r', 'j', 'a', 'n', 'u', 'a', 'r', 'y', 't', 'w', 'e', 'n', 't', 'y', 't', 'w', 'o', 's', 'a', 't', 'u', 'r', 'd', 'a', 'y']
return : 6

괄호 연산 검증기

괄호(parentheses) 란,
문장부호의 하나. 수식이나 문장 등에서 어느 부분을 다른 부분과 구별하거나 강조하기 위하여 그 앞뒤에 치는 기호로 묶음표라고 하며 기호는 (), { }, , 〔 〕, [ ], 「 」, (()), 《 》, 〚〛, 〖 〗, 『 』 등이 있다.

계산기를 구현하기에 앞서 수식에 괄호가 정상적으로 열고 닫혔는지 검사할 필요가 있다.
아래 6가지 경우에 대해서 정상여부를 판단하고 스택(Stack)으로 구현하시오.

‘{2 + 4 x (3 + 5)}’ -> True
‘[3 + 2 / (7 x 2] }’ -> False
‘(4 + 1) x (3 x 4)’ -> True
‘3 * 2 + [4 x 3]’ -> True
‘(){[]}’ -> True
‘[3 + 2] x 4 + (3 + 6}’ -> False

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.