프로그래밍 /코딩 연습 썸네일형 리스트형 [구글 코딩 잼] Magic Trick - Qualification Round Problem 1 2014년 Google Code Jam Qualification Round 에 참가했습니다. 구글 코드잼은 구글에서 진행하는 프로그램으로서 2003년부터 지금까지 계속 진행되고 있는 일종의 코딩 대회입니다. 하지만 대회라고 해서 정해진 장소 한곳에 모여서 하는게 아니라 Qualification Round 에서 Round 1, Round 2, Round 3 까지는 집에서나 컴퓨터만 있으면 어디에서나 참가할수 있는 코딩 경기 대회입니다. 일정한 시간에 프로그래밍 문제가 주어지고 주어진 시간안에 그 문제를 풀고 답을 제출하면 컴퓨터가 결과를 측정해서 랭킹을 주는거죠. Qualification Round 에서는 총 27시간이 주어졌는데요. 다행히도 전 4 문제중에 2 문제를 풀어서 25점을 받고 Round 1 .. 더보기 마이크로소프트 (Microsoft) 인터뷰 코딩 연습 문제 - Formatted Phone Number [사진 출처: http://tctechcrunch2011.files.wordpress.com/2009/01/microsoft.jpg] Microsoft 에서 준다는 인터뷰 문제를 풀어 봤어요. 전화번호를 어떤 식으로 저장 시킬지 결정하는게 제일 고민했던 부분이였던것 같습니다. 처음에는 숫자를 키로 하고 알파벳을 값으로 해서 맵핑을 해봤는데 아무래도 그럴려면 효율적이지 몰라도 간단한 문제를 너무 복잡하게 만드는것 같았어요. 그래서 그냥 HashMap 쓰고 알파벳을 키로 하고 숫자를 값으로 하고 푸는 방식으로 했어요. 역시 Data Structure 가 중요한듯. 문제 Print the actual phone number when given an alphanumeric phone number. For e.g.. 더보기 아마존 닷컴 (Amazon.com) 코딩 연습 문제 - Non Repeating Character [사진 출처: http://static.interviewstreet.com/whitelabel/code_ninja.png] Amazon.com 에서 준다는 인터뷰 문제중에 하나를 풀어 봤습니다. char 을 integer 가격으로 바꾸는점 하고 ascii 만 주어진다고 가정하고 계산하는게 충분할지 결정하는 순간만 빼고는 그렇게 어렵지는 않았어요. 문제 Find the non-repeating character in a stream of characters. 해석: character 를 저장되어 있는 리스트가 인풋으로 주어지면 그 중 제일 처음으로 반복되지 않는 character 를 찾아라. 우선 characters 들 종류가 총 256개 만 있다고 가정했습니다. 아메리칸 스탠다드인 ASCII 는 126개.. 더보기 구글 코딩 잼 연습 - Store Credit 솔류션 [출처: https://code.google.com/codejam/contest/351101/dashboard#s=p0] 사용된 언어는 Java 입니다 ^^ 풀어야 될 문제는 다음과 같네요. ProblemYou receive a credit C at a local store and would like to buy two items. You first walk through the store and create a list L of all available items. From this list you would like to buy two items that add up to the entire value of the credit. The solution you provide will consist of.. 더보기 구글 코딩 잼 연습 - Reverse Words 솔류션 [출처: https://code.google.com/codejam/contest/351101/dashboard#s=p1] 연습문제라서 포스팅 해도 괜찮겠죠 ㅎㅎ 사용된 프로그래밍 언어는 Java 입니다 ^^ ProblemGiven a list of space separated words, reverse the order of the words. Each line of text contains L letters and W words. A line will only consist of letters and space characters. There will be exactly one space character between each pair of consecutive words. InputThe first.. 더보기 이전 1 다음