본문 바로가기

Day 3: Intro to Conditional Statements Task Given an integer, , perform the following conditional actions:If is odd, print WeirdIf is even and in the inclusive range of to , print Not WeirdIf is even and in the inclusive range of to , print WeirdIf is even and greater than , print Not WeirdComplete the stub code provided in your editor to print whether or not is weird.Input FormatA single line containing a positive integer, .Constrai.. 더보기
Day 2: Operators Task Given the meal price (base cost of a meal), tip percent (the percentage of the meal price being added as tip), and tax percent (the percentage of the meal price being added as tax) for a meal, find and print the meal's total cost.Note: Be sure to use precise values for your calculations, or you may end up with an incorrectly rounded result!Input FormatThere are lines of numeric input: The f.. 더보기
뭐하는 사람인지 (update: 2018.02.09) 2년차 비전공자 개발자이며 회사에서 안드로이드 개발을 맡고 있습니다. 블로그를 하는 이유는 누군가에게 양질의 정보를 잘 정리해서 알려주기 보다는 진짜 내가 보려고 끄적이는 정도로만 쓰고 있어요. (정리해서 올리기가 너무 귀찮음ㅇㅁㄹ니람) 언젠가 귀찮지 않고 설명충이 되고 싶을 때는 자세히 정리해서 올려 보겠습니다~ Technical SkillsLanguage - Java, Kotlin, Php Database- Realm, Mysql, Sqlite, MongoDB Server- Nginx, Apache Platforms- Android, Linux(Ubuntu), AWS Web-HTML, CSS ETC- Networking(HTTP & TCP/IP), Android NDK, OpenCV, Swift4(i.. 더보기
Hash Tables: Ransom Note A kidnapper wrote a ransom note but is worried it will be traced back to him. He found a magazine and wants to know if he can cut out whole words from it and use them to create an untraceable replica of his ransom note. The words in his note are case-sensitive and he must use whole words available in the magazine, meaning he cannotuse substrings or concatenation to create the words he needs.Give.. 더보기
Strings: Making Anagrams Alice is taking a cryptography class and finding anagrams to be very useful. We consider two strings to be anagrams of each other if the first string's letters can be rearranged to form the second string. In other words, both strings must contain the same exact letters in the same exact frequency For example, bacdc and dcbac are anagrams, but bacdc and dcbad are not.Alice decides on an encryptio.. 더보기
Level 1 - 행렬의 덧셈 행렬의 덧셈은 행과 열의 크기가 같은 두 행렬의 같은 행, 같은 열의 값을 서로 더한 결과가 됩니다. 2개의 행렬을 입력받는 sumMatrix 함수를 완성하여 행렬 덧셈의 결과를 반환해 주세요.예를 들어 2x2 행렬인 A = ((1, 2), (2, 3)), B = ((3, 4), (5, 6)) 가 주어지면, 같은 2x2 행렬인 ((4, 6), (7, 9))를 반환하면 됩니다.(어떠한 행렬에도 대응하는 함수를 완성해주세요.) 풀이class SumMatrix {int[][] sumMatrix(int[][] A, int[][] B) {int[][] answer = new int[A.length][A[0].length]; for (int i = 0; i < A.length; i++) { for (int j = .. 더보기
Day 1: Data Types Objective Today, we're discussing data types. Check out the Tutorial tab for learning materials and an instructional video!Task Complete the code in the editor below. The variables , , and are already declared and initialized for you. You must:Declare variables: one of type int, one of type double, and one of type String.Read lines of input from stdin (according to the sequence given in the Inpu.. 더보기
Level 1 - 약수의 합 어떤 수를 입력받아 그 수의 약수를 모두 더한 수 sumDivisor 함수를 완성해 보세요. 예를 들어 12가 입력된다면 12의 약수는 [1, 2, 3, 4, 6, 12]가 되고, 총 합은 28이 되므로 28을 반환해 주면 됩니다. 풀이 class SumDivisor {public int sumDivisor(int num) {int answer = 0; for (int i = 1; i 더보기
TableView 관련 2 코드 상의 주석으로 기록해둠 스토리보드 상에서 identifier를 잘 넣어두고, autoLayout에 constraint를 꼭 넣어줄 것 import UIKit class MainViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var mainMenuTableView: UITableView! let sampleData = SampleData() override func viewDidLoad() { super.viewDidLoad() mainMenuTableView.delegate = self // controller 에 tableview 뷰를 보여주게 함 mainMenuTableView.. 더보기
Common Elements in Two Sorted Arrays (Java) Common Elements in Two Sorted Arrays (Java)Write a function that returns the common elements (as an array) between two sorted arrays of integers (ascending order).Example: The common elements between [1, 3, 4, 6, 7, 9] and [1, 2, 4, 5, 9, 10] are [1, 4, 9]. 풀이ascending order임으로 중복된 숫자는 안들어감map 에 담아서 중복되는 게 있으면 list에 담아두고 이걸 나중에 array 변환 (list는 resizable하니까) import java.util.ArrayList;import java.. 더보기