Swift Coding Test Course, Understanding Friend Relationships

Problem Description

This problem is related to graphs, which often appear in coding tests, and it will focus on understanding friendships.
Friendships can be represented as ‘bidirectional edges’, and in this problem, we will implement an algorithm to output
the friends of a specific friend based on given friendships.

Problem

Problem Description: There are N friends. Each friend considers each other a friend, and the friendships
are given in pairs. Given these friendships, write a program that outputs the friend list of a specific friend.
However, duplicate friends should be excluded.

Input Format:
– The first line contains two integers N (1 ≤ N ≤ 100) and M (1 ≤ M ≤ 1000).
– The next M lines consist of two integers A and B that represent the friendships.
– A and B are the numbers denoting friends, and A ≠ B always holds.

Output Format:
– Output the friend list of a specific friend K (1 ≤ K ≤ N) separated by spaces.

Example Input

5 5
1 2
1 3
2 4
3 4
4 5
3

Example Output

2 4

Problem Solving Process

Step 1: Understanding the Problem

To understand the problem, let’s think about how we can represent the given friendships.
Friendships can be represented as a graph, where ‘friends’ are ‘nodes’ and friendships are ‘edges’.
This allows us to easily find each friend’s friend list.

Step 2: Choosing a Data Structure

An ‘adjacency list’ is appropriate for representing friendships.
We can use a dictionary or an array to store each friend’s friend list.
In this problem, we will use an array with friend numbers as indices.

Step 3: Implementation

Now, let’s implement the code in Swift to solve the problem.
First, we will take the input and build an adjacency list to represent friendships, then write a program
that outputs the friend list of a specific friend K.


import Foundation

func main() {
    // Input
    let firstLine = readLine()!.split(separator: " ").map { Int($0)! }
    let N = firstLine[0] // Number of friends
    let M = firstLine[1] // Number of friendships
    
    // Array to store friendships (adjacency list)
    var friends = [[Int]](repeating: [], count: N + 1)
    
    // Input friendships
    for _ in 0..<m {="" let="" relation="readLine()!.split(separator:" "="" ").map="" int($0)!="" }="" a="relation[0]" b="relation[1]" friends[a].append(b)="" friends[b].append(a)="" k="Int(readLine()!)!" friend's="" number="" friendlist="friends[K].sorted()" print(friendlist.map="" string($0)="" }.joined(separator:="" "))="" main()="" <="" code=""></m>
<h3>Step 4: Code Explanation</h3> <p> The code can be divided into three main parts. The explanations for each section are as follows. </p> <ul> <li> <strong>Input and Initialization:</strong><p></p> <ul> <li>First, the number of friends N and the number of friendships M are read in from the first line.</li> <li>Next, an empty array of size N+1 is created to store each friend's friend list.</li> </ul> </li> <li> <strong>Input Friendships:</strong><p></p> <ul> <li>The friendships are read from the next M lines and stored in the adjacency list to maintain bidirectional relationships.</li> </ul> </li> <li> <strong>Output Friend List of K:</strong><p></p> <ul> <li>The friend list of a specific friend K is sorted and printed, separated by spaces.</li> </ul> </li> </ul> <h2>Step 5: Testing the Code</h2> <p> Various input cases should be considered to test the written code.<br> For example, let's try the following test case: </p> <h3>Example Input 1</h3> <pre>5 5 1 2 1 3 2 4 3 4 4 5 3 </pre> <h3>Example Output 1</h3> <pre>2 4 </pre> <h3>Example Input 2</h3> <pre>4 4 1 2 2 3 3 4 4 1 1 </pre> <h3>Example Output 2</h3> <pre>2 4 </pre> <h3>Example Input 3</h3> <pre>4 4 1 2 3 4 2 3 1 4 2 </pre> <h3>Example Output 3</h3> <pre>1 3 </pre> <h2>Conclusion</h2> <p> In this tutorial, we implemented an algorithm to understand friendships and output the<br> friend list of a specific friend using Swift.<br> Graph problems have various applications, so it's essential to practice thoroughly to enhance<br> understanding of algorithms. </p> <p> We hope you continue to improve your skills by solving more problems. </p> <p></p>
<footer class="entry-footer"> <span class="byline"><span class="author vcard"><img alt="" src="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=49&amp;d=mm&amp;r=g" srcset="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=98&amp;d=mm&amp;r=g 2x" class="avatar avatar-49 photo" height="49" width="49" decoding="async"><span class="screen-reader-text">Author </span> <a class="url fn n" href="https://atmokpo.com/w/en/author/root/">root</a></span></span><span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="https://atmokpo.com/w/34876/" rel="bookmark"><time class="entry-date published" datetime="2024-11-01T09:33:02+00:00">2024/11/01</time><time class="updated" datetime="2024-11-01T11:26:09+00:00">2024/11/01</time></a></span><span class="cat-links"><span class="screen-reader-text">Categories </span><a href="https://atmokpo.com/w/category/swift-coding-test/" rel="category tag">Swift Coding Test</a></span> </footer><!-- .entry-footer -->
<article id="post-34874" class="post-34874 post type-post status-publish format-standard hentry category-swift-coding-test"> <header class="entry-header"> <h2 class="entry-title"><a href="https://atmokpo.com/w/34874/" rel="bookmark">Swift Coding Test Course, Finding the Longest Common Subsequence</a></h2> </header><!-- .entry-header --> <div class="entry-content"> <p></p> <p>Hello! In this blog post, we will take a deep dive into how to solve the Longest Common Subsequence (LCS) problem using the Swift programming language. The LCS problem involves finding the longest subsequence that appears in both of two strings. This can be solved through various algorithms and dynamic programming. In this article, I will guide you through understanding the problem and implementing the algorithm in detail.</p> <h2>1. Understanding the Problem</h2> <p>The Longest Common Subsequence (LCS) problem is to find the longest subsequence that is common to both sequences while maintaining the original order. For example, given the two strings “ABCBDAB” and “BDCAB”, their LCS is “BDAB”, and its length is 4.</p> <h2>2. Problem Description</h2> <p>Let’s write a function to determine the length of the LCS for the given two strings S1 and S2. Let’s assume the two strings are defined as follows:</p> <pre>S1 = "ABCBDAB" S2 = "BDCAB" </pre> <p>Now, let’s explore a general approach to find the LCS.</p> <h2>3. Problem-Solving Methodology</h2> <p>The most well-known method to solve the LCS problem is Dynamic Programming. This approach involves breaking the problem down into subproblems, solving those, and reusing the results to derive a solution for the entire problem. I will explain this process step by step.</p> <h3>3.1 Initializing the Dynamic Programming Table</h3> <p>First, let’s denote the lengths of the two strings S1 and S2 as m and n, respectively. We create and initialize a 2D array (dp) of size m+1 x n+1. Each element dp[i][j] represents the length of LCS of the first i characters of S1 and the first j characters of S2. The initialization process is as follows:</p> <pre>for i in 0 to m: dp[i][0] = 0 for j in 0 to n: dp[0][j] = 0 </pre> <h3>3.2 Dynamic Programming Recurrence Relation</h3> <p>Now let’s define the recurrence relation to update the LCS values for each character. If the i-th character of S1 and the j-th character of S2 are the same, the length of LCS up to that character is the previous LCS length plus 1. That is:</p> <pre>if S1[i-1] == S2[j-1] then dp[i][j] = dp[i-1][j-1] + 1 else dp[i][j] = max(dp[i-1][j], dp[i][j-1]) </pre> <p>This recurrence relation allows us to calculate all elements, and ultimately, we can obtain the length of LCS at dp[m][n].</p> <h2>4. Implementing the Swift Code</h2> <p>Now, based on the above process, let’s implement LCS in Swift. Below is the function that calculates the longest common subsequence.</p> <pre>func longestCommonSubsequence(_ S1: String, _ S2: String) -&gt; Int { let s1Array = Array(S1) let s2Array = Array(S2) let m = s1Array.count let n = s2Array.count var dp = Array(repeating: Array(repeating: 0, count: n + 1), count: m + 1) for i in 1...m { for j in 1...n { if s1Array[i - 1] == s2Array[j - 1] { dp[i][j] = dp[i - 1][j - 1] + 1 } else { dp[i][j] = max(dp[i - 1][j], dp[i][j - 1]) } } } return dp[m][n] } </pre> <p>The above function takes two strings S1 and S2 as arguments and returns the length of the longest common subsequence.</p> <h2>5. Test Cases</h2> <p>Let’s create a few test cases to test the function.</p> <pre>let S1 = "ABCBDAB" let S2 = "BDCAB" let result = longestCommonSubsequence(S1, S2) print("The length of the longest common subsequence is \(result).") // Output: 4 </pre> <p>Through testing, we can verify that our algorithm returns the correct results.</p> <h2>6. Time Complexity Analysis</h2> <p>The time complexity of this algorithm using dynamic programming is O(m*n), and the space complexity is also O(m*n). Here, m and n represent the lengths of the two strings. This complexity can grow rapidly as the length of the strings increases, so optimization techniques such as memoization can be applied to reduce space complexity.</p> <h2>7. Conclusion</h2> <p>In this article, we explored using dynamic programming techniques to solve the longest common subsequence problem and how to implement it in Swift. The LCS problem is widely used in computer science and plays an important role in various applications. This algorithm can be utilized in many scenarios, enhancing our ability to solve programming problems.</p> <p>I hope that by continuing to solve various algorithm problems, you will find it helpful in preparing for coding tests. Thank you!</p> <p></p> </div><!-- .entry-content --> <footer class="entry-footer"> <span class="byline"><span class="author vcard"><img alt="" src="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=49&amp;d=mm&amp;r=g" srcset="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=98&amp;d=mm&amp;r=g 2x" class="avatar avatar-49 photo" height="49" width="49" decoding="async"><span class="screen-reader-text">Author </span> <a class="url fn n" href="https://atmokpo.com/w/en/author/root/">root</a></span></span><span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="https://atmokpo.com/w/34874/" rel="bookmark"><time class="entry-date published" datetime="2024-11-01T09:33:01+00:00">2024/11/01</time><time class="updated" datetime="2024-11-01T11:26:09+00:00">2024/11/01</time></a></span><span class="cat-links"><span class="screen-reader-text">Categories </span><a href="https://atmokpo.com/w/category/swift-coding-test/" rel="category tag">Swift Coding Test</a></span> </footer><!-- .entry-footer --> </article><!-- #post-34874 --> <article id="post-34872" class="post-34872 post type-post status-publish format-standard hentry category-swift-coding-test"> <header class="entry-header"> <h2 class="entry-title"><a href="https://atmokpo.com/w/34872/" rel="bookmark">Swift Coding Test Course, Finding Parenthesis Arrangement to Make Minimum Value</a></h2> </header><!-- .entry-header --> <div class="entry-content"> <p></p> <h2>Problem: Finding Parentheses Arrangement that Minimizes Value</h2> <p>Algorithm problems play an important role in coding tests, and especially problems related to parentheses are often presented. In this article, we will address the challenge of finding the minimum value by considering all possible parentheses arrangements for a given expression. We will explain the theories and algorithms necessary to solve this problem in detail.</p> <h3>Problem Description</h3> <p>There is a string composed of given numbers and operators. This string can be calculated by placing parentheses in various ways. Our goal is to find the minimum value that can be obtained by placing parentheses.</p> <p><strong>Input</strong>: “1+2*3-4*5” <br> <strong>Output</strong>: -1</p> <h3>Approach to the Problem</h3> <p>This problem can be solved using Dynamic Programming. We need to consider all possible placements of parentheses for the given expression, so the Divide and Conquer technique will also be utilized.</p> <h4>1. Parsing the Expression</h4> <p>First, we need to separate the numbers and operators from the expression and store them in arrays. For example, we will convert the string “1+2*3-4*5” into the following format.</p> <pre> Number array: [1, 2, 3, 4, 5] Operator array: ['+', '*', '-', '*'] </pre> <h4>2. Defining Dynamic Programming</h4> <p>Dynamic programming is a method that stores the results of each subproblem through several auxiliary arrays for future use. By using memoization, we can reduce time complexity by reusing results that have already been calculated.</p> <h4>3. Implementing the Recursive Function</h4> <p>We will calculate all possible combinations through a recursive function. This function divides based on the given index and calculates by placing parentheses differently for each side.</p> <h3>Swift Implementation</h3> <p>Below is the complete code implemented in the Swift programming language.</p> <pre><code> func minValue(expression: String) -&gt; Int { var numbers: [Int] = [] var operators: [Character] = [] // Step 1: Parse the expression var currentNumber = "" for char in expression { if char.isNumber { currentNumber.append(char) } else { numbers.append(Int(currentNumber)!) operators.append(char) currentNumber = "" } } numbers.append(Int(currentNumber)!) // Step 2: Create a memoization table var memo: [[Int?]] = Array(repeating: Array(repeating: nil, count: numbers.count), count: numbers.count) // Step 3: Define a recursive function func compute(_ left: Int, _ right: Int, _ op: Character) -&gt; Int { switch op { case '+': return left + right case '-': return left - right case '*': return left * right default: fatalError("Unknown operator") } } // Recursive function for minimum value func findMinValue(left: Int, right: Int) -&gt; Int { if left == right { return numbers[left] } if let result = memo[left][right] { return result } var result = Int.max for i in left..<right {="" let="" leftvalue="findMinValue(left:" left,="" right:="" i)="" rightvalue="findMinValue(left:" i="" +="" 1,="" right)="" computedvalue="compute(leftValue," rightvalue,="" operators[i])="" result="min(result," computedvalue)="" }="" memo[left][right]="result" return="" calculate="" the="" minimum="" value="" for="" whole="" expression="" findminvalue(left:="" 0,="" numbers.count="" -="" 1)="" <="" code=""></right></code></pre><code> <h3>Time Complexity Analysis</h3> <p>The time complexity of this algorithm is O(N^3). N is the number of digits, as we need to evaluate the operators for each combination of two digits. However, due to the use of memoization, we do not recalculate the same subproblems repeatedly.</p> <h3>Conclusion</h3> <p>In this lecture, we covered the problem of "Finding Parentheses Arrangement that Minimizes Value" and explored the process of solving the problem and its implementation in Swift. I hope you achieve good results in coding tests through various approaches and optimization techniques to algorithm problems. Thank you!</p> <p></p> </code></div><!-- .entry-content --><code> <footer class="entry-footer"> <span class="byline"><span class="author vcard"><img alt="" src="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=49&amp;d=mm&amp;r=g" srcset="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=98&amp;d=mm&amp;r=g 2x" class="avatar avatar-49 photo" height="49" width="49" decoding="async"><span class="screen-reader-text">Author </span> <a class="url fn n" href="https://atmokpo.com/w/en/author/root/">root</a></span></span><span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="https://atmokpo.com/w/34872/" rel="bookmark"><time class="entry-date published" datetime="2024-11-01T09:32:59+00:00">2024/11/01</time><time class="updated" datetime="2024-11-01T11:26:10+00:00">2024/11/01</time></a></span><span class="cat-links"><span class="screen-reader-text">Categories </span><a href="https://atmokpo.com/w/category/swift-coding-test/" rel="category tag">Swift Coding Test</a></span> </footer><!-- .entry-footer --> </code></article><!-- #post-34872 --><code> <article id="post-34870" class="post-34870 post type-post status-publish format-standard hentry category-swift-coding-test"> <header class="entry-header"> <h2 class="entry-title"><a href="https://atmokpo.com/w/34870/" rel="bookmark">Swift Coding Test Course, Finding Minimum Value 2</a></h2> </header><!-- .entry-header --> <div class="entry-content"> <p></p> <p>Hello, everyone! Today is the second session of our algorithm problem-solving course for employment using Swift. In this session, we will tackle the problem of finding the minimum value within a given array. I will provide detailed explanations to help you develop a foundational mindset for solving algorithm problems, so please pay attention.</p> <h2>Problem Description</h2> <p>We have a given integer array <code>numbers</code>. This array can contain negative and positive numbers, as well as 0. Our goal is to find the minimum value in this array and return the index at which this minimum value is located. If the array is empty, we should return <code>-1</code>. Here are examples of the problem:</p> <h3>Input Format</h3> <ul> <li>Integer array <code>numbers</code> (length: 0 or more)</li> </ul> <h3>Output Format</h3> <ul> <li>The index of the minimum value (integer)</li> </ul> <h3>Example</h3> <pre class="code-block">Input: numbers = [3, 1, 4, 1, 5, 9, 2, 6, 5] Output: 1 Explanation: The minimum value is <code>1</code>, and its index is <code>1</code>. </pre> <pre class="code-block">Input: numbers = [] Output: -1 Explanation: Since the array is empty, we return <code>-1</code>. </pre> <h2>Problem-Solving Process</h2> <p>Now, let’s take a step-by-step look at the process of solving the problem.</p> <h3>Step 1: Understanding the Problem</h3> <p>First, we need to accurately understand the given problem. We need to find the index of the minimum value in a number array, and note that we should return <code>-1</code> if the collection is empty. Therefore, the approach will vary depending on the length of the array.</p> <h3>Step 2: Developing a Strategy</h3> <p>The most intuitive way to find the minimum value is to iterate through the array once. During this process, we can update the minimum value while comparing each element and keep track of its position. When the size of the array is <code>n</code>, the time complexity of this approach is <code>O(n)</code>. This can be considered an efficient approach.</p> <h3>Step 3: Implementing the Algorithm</h3> <p>Now, let’s implement our algorithm in Swift. Here is the Swift code to find the minimum value:</p> <pre class="code-block">func findMinIndex(numbers: [Int]) -&gt; Int { // Return -1 if the array is empty if numbers.isEmpty { return -1 } var minIndex = 0 // Index of the minimum value var minValue = numbers[0] // Minimum value // Iterate through the array for index in 1..<numbers.count {="" if="" numbers[index]="" <="" minvalue="" update="" minimum="" value="" minindex="index" index="" }="" return="" pre=""> <h3>Step 4: Code Explanation</h3> <p>The code above works by iterating through the array, updating the minimum value and its corresponding index.</p> <ul> <li><code>if numbers.isEmpty</code>: Returns <code>-1</code> if the array is empty.</li> <li><code>var minIndex = 0</code>: Initializes the minimum value index.</li> <li><code>var minValue = numbers[0]</code>: Sets the initial minimum value to the first element.</li> <li><code>for index in 1..<numbers.count< code="">: Iterates through the remaining elements of the array.</numbers.count<></code></li><code> <li><code>if numbers[index] &lt; minValue</code>: Updates the minimum value and index if the current element is less than the minimum value.</li> </code></ul><code> <h3>Step 5: Test Cases</h3> <p>Now, let’s run various test cases to verify that our implementation is correct. Here are some test cases:</p> <pre class="code-block">print(findMinIndex(numbers: [3, 1, 4, 1, 5, 9, 2, 6, 5])) // 1 print(findMinIndex(numbers: [])) // -1 print(findMinIndex(numbers: [10, -3, 2, 5])) // 1 print(findMinIndex(numbers: [1, 1, 1, 1])) // 0 print(findMinIndex(numbers: [-10, -20, 0, 5])) // 1 </pre> <h2>Conclusion</h2> <p>Today, we explored the process of implementing an algorithm to find the minimum value in an array using Swift. Such problems frequently appear in various coding tests and can help familiarize you with fundamental arrays and control structures. I hope to continue solving various algorithm problems together to further enhance your coding skills. Thank you!</p> <div class="note"> <strong>Note:</strong> Complex algorithm problems can be approached in various ways. Always understand the conditions and requirements of the problem well, and seek efficient methods. </div> <p></p> </code></numbers.count></pre></div><!-- .entry-content --><code> <footer class="entry-footer"> <span class="byline"><span class="author vcard"><img alt="" src="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=49&amp;d=mm&amp;r=g" srcset="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=98&amp;d=mm&amp;r=g 2x" class="avatar avatar-49 photo" height="49" width="49" loading="lazy" decoding="async"><span class="screen-reader-text">Author </span> <a class="url fn n" href="https://atmokpo.com/w/en/author/root/">root</a></span></span><span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="https://atmokpo.com/w/34870/" rel="bookmark"><time class="entry-date published" datetime="2024-11-01T09:32:58+00:00">2024/11/01</time><time class="updated" datetime="2024-11-01T11:26:10+00:00">2024/11/01</time></a></span><span class="cat-links"><span class="screen-reader-text">Categories </span><a href="https://atmokpo.com/w/category/swift-coding-test/" rel="category tag">Swift Coding Test</a></span> </footer><!-- .entry-footer --> </code></article><!-- #post-34870 --><code> <article id="post-34868" class="post-34868 post type-post status-publish format-standard hentry category-swift-coding-test"> <header class="entry-header"> <h2 class="entry-title"><a href="https://atmokpo.com/w/34868/" rel="bookmark">Swift Coding Test Course, Finding Minimum Value 1</a></h2> </header><!-- .entry-header --> <div class="entry-content"> <p></p> <article> <header> <p>Author: [Your Name]</p> <p>Date: [Date]</p> </header> <section> <h2>1. Problem Description</h2> <p> This is the problem of finding the minimum value in a given integer array.<br> The array may contain duplicate values, and its length can be between 1 and 100,000.<br> The function should return the minimum value. If the array is empty, it should return nil. </p> <p> <strong>Function Signature:</strong> </p> <pre><code>func findMinimum(in array: [Int]) -&gt; Int?</code></pre> </section> <section> <h2>2. Sample Input</h2> <ul> <li>Input: [3, 5, 1, 2, 4] ➞ Output: 1</li> <li>Input: [10, 20, 30, 5, 15] ➞ Output: 5</li> <li>Input: [] ➞ Output: nil</li> <li>Input: [5, 5, 5, 5] ➞ Output: 5</li> </ul> </section> <section> <h2>3. Problem Solving Process</h2> <p> To solve this problem, a basic array searching algorithm can be used.<br> To find the minimum value, we need to traverse each element of the array and check if there is an element smaller than the current minimum.<br> Below is the process to solve the problem. </p> <h3>3.1. Algorithm Design</h3> <p> 1. Check if the array is empty. If it is, return nil.<br> 2. Initialize the first element as the minimum value.<br> 3. Traverse each element of the array to find an element smaller than the current minimum.<br> 4. If the minimum value is updated, continue to store it.<br> 5. Return the final minimum value. </p> <h3>3.2. Time Complexity</h3> <p> This algorithm finds the minimum value in a single traversal of the array, so<br> the time complexity is O(n). Here, n is the length of the array.<br> Even in the worst-case scenario, we need to check all elements of the array, making it<br> an efficient approach. </p> <h3>3.3. Code Implementation</h3> <p>Now, let’s implement the above algorithm in Swift.</p> <pre><code> func findMinimum(in array: [Int]) -&gt; Int? { // If the array is empty guard !array.isEmpty else { return nil } var minimum = array[0] // Initialize with the first element for number in array { if number &lt; minimum { // If it is less than the current minimum minimum = number // Update the minimum } } return minimum // Return the minimum } </code></pre> </section> <section> <h2>4. Test Cases</h2> <p> After writing the function, it is essential to test it with various inputs.<br> Below is the test code for several cases. </p> <pre><code> let testCases = [ ([3, 5, 1, 2, 4], 1), ([10, 20, 30, 5, 15], 5), ([], nil), ([5, 5, 5, 5], 5), ([100, 200, 50, 150], 50) ] for (input, expected) in testCases { let output = findMinimum(in: input) print("Input: \(input), Expected: \(expected), Output: \(String(describing: output))") } </code></pre> </section> <section> <h2>5. Conclusion</h2> <p> In this lesson, we implemented an algorithm to find the minimum value in a given array<br> using Swift. If you have understood the basic concepts and implementation methods of the algorithm,<br> it is also important to validate the logic through test cases with various inputs.<br> Work on more algorithmic problems in the future to improve your Swift coding skills! </p> </section> </article> <p></p> </div><!-- .entry-content --> <footer class="entry-footer"> <span class="byline"><span class="author vcard"><img alt="" src="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=49&amp;d=mm&amp;r=g" srcset="https://secure.gravatar.com/avatar/5b7f47db621d1eab02540d35048be506?s=98&amp;d=mm&amp;r=g 2x" class="avatar avatar-49 photo" height="49" width="49" loading="lazy" decoding="async"><span class="screen-reader-text">Author </span> <a class="url fn n" href="https://atmokpo.com/w/en/author/root/">root</a></span></span><span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="https://atmokpo.com/w/34868/" rel="bookmark"><time class="entry-date published" datetime="2024-11-01T09:32:55+00:00">2024/11/01</time><time class="updated" datetime="2024-11-01T11:26:11+00:00">2024/11/01</time></a></span><span class="cat-links"><span class="screen-reader-text">Categories </span><a href="https://atmokpo.com/w/category/swift-coding-test/" rel="category tag">Swift Coding Test</a></span> </footer><!-- .entry-footer --> </article><!-- #post-34868 --> <nav class="navigation pagination" aria-label="Posts pagination"> <h2 class="screen-reader-text">Posts pagination</h2> <div class="nav-links"><a class="prev page-numbers" href="https://atmokpo.com/w/category/swift-coding-test/page/4/?lcp_pagelistcategorypostswidget-3=9">Previous page</a> <a class="page-numbers" href="https://atmokpo.com/w/category/swift-coding-test/?lcp_pagelistcategorypostswidget-3=9"><span class="meta-nav screen-reader-text">Page </span>1</a> <span class="page-numbers dots">…</span> <a class="page-numbers" href="https://atmokpo.com/w/category/swift-coding-test/page/4/?lcp_pagelistcategorypostswidget-3=9"><span class="meta-nav screen-reader-text">Page </span>4</a> <span aria-current="page" class="page-numbers current"><span class="meta-nav screen-reader-text">Page </span>5</span> <a class="page-numbers" href="https://atmokpo.com/w/category/swift-coding-test/page/6/?lcp_pagelistcategorypostswidget-3=9"><span class="meta-nav screen-reader-text">Page </span>6</a> <span class="page-numbers dots">…</span> <a class="page-numbers" href="https://atmokpo.com/w/category/swift-coding-test/page/27/?lcp_pagelistcategorypostswidget-3=9"><span class="meta-nav screen-reader-text">Page </span>27</a> <a class="next page-numbers" href="https://atmokpo.com/w/category/swift-coding-test/page/6/?lcp_pagelistcategorypostswidget-3=9">Next page</a></div> </nav> </code></code>
<code> </code>
<code> <aside id="secondary" class="sidebar widget-area"> <section id="block-2" class="widget widget_block widget_search"><form role="search" method="get" action="https://atmokpo.com/w/en/" class="wp-block-search__button-outside wp-block-search__text-button wp-block-search"><label class="wp-block-search__label" for="wp-block-search__input-1">Search</label><div class="wp-block-search__inside-wrapper "><input class="wp-block-search__input" id="wp-block-search__input-1" placeholder="" value="" type="search" name="s" required=""><button aria-label="Search" class="wp-block-search__button wp-element-button" type="submit">Search</button></div></form></section><section id="block-10" class="widget widget_block"><ul class="wp-block-page-list"><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/c-coding-test-tutorials/">C++ Coding Test Tutorials</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/collection-of-c-coding-test-tutorials/">Collection of C# Coding Test Tutorials</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/deep-learning-automated-trading/">Deep learning Automated trading</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/deep-learning-natural-language-processing/">Deep learning natural language processing</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/english-sentence-study/">English sentence study</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/flutter-course/">Flutter course</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/gan-deep-learning-course/">GAN deep learning course</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/java-android-app-development/">Java Android app development</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/java-coding-test/">Java Coding Test</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/javascript-coding-test/">Javascript Coding Test</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/kotlin-android-app-development/">Kotlin Android app development</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/kotlin-coding-test/">Kotlin coding test</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/python-auto-trading/">Python Auto Trading</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/python-coding-test/">Python Coding Test</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/python-study/">Python Study</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/pytorch-study/">PyTorch Study</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/react-basics-course/">React basics course</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/spring-boot-backend-development/">Spring Boot backend development</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/swift-coding-test/">Swift Coding Test</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/swift-iphone-app-development-swiftui/">Swift iPhone app development (SwiftUI)</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/swift-iphone-app-development-uikit/">Swift iPhone app development (UIKit)</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/unity-basic/">Unity Basic</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/using-hugging-face/">Using Hugging Face</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/uwp-programming/">UWP Programming</a></li><li class="wp-block-pages-list__item"><a class="wp-block-pages-list__item__link" href="https://atmokpo.com/w/wpf-programming/">WPF Programming</a></li></ul></section><section id="listcategorypostswidget-3" class="widget widget_listcategorypostswidget"><h2 class="widget-title">Category Post List</h2><ul class="lcp_catlist" id="lcp_instance_listcategorypostswidget-3"><li><a href="https://atmokpo.com/w/34756/">Swift Coding Test Course, Grouping Line Segments</a></li><li><a href="https://atmokpo.com/w/34754/">Swift Coding Test Course, Finding the Direction of Line Segments</a></li><li><a href="https://atmokpo.com/w/34752/">Swift Coding Test Course, Gift Delivery</a></li><li><a href="https://atmokpo.com/w/34750/">Swift Coding Test Course, Insertion Sort</a></li><li><a href="https://atmokpo.com/w/34748/">Swift Coding Test Course, Dictionary Lookup</a></li><li><a href="https://atmokpo.com/w/34746/">Swift Coding Test Course, Finding the Building Order</a></li><li><a href="https://atmokpo.com/w/34744/">Swift Coding Test Course, Creating Blu-ray</a></li><li><a href="https://atmokpo.com/w/34742/">Swift Coding Test Course, I Will Become the President of the Women’s Association</a></li><li><a href="https://atmokpo.com/w/34740/">Swift Coding Test Course, Merge Sort</a></li><li><a href="https://atmokpo.com/w/34738/">Swift Coding Test Course, Bellman-Ford</a></li></ul><ul class="lcp_paginator"><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=8#lcp_instance_listcategorypostswidget-3" title="8" class="lcp_prevlink">&lt;&lt;</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=1#lcp_instance_listcategorypostswidget-3" title="1">1</a></li><span class="lcp_elipsis">...</span><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=4#lcp_instance_listcategorypostswidget-3" title="4">4</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=5#lcp_instance_listcategorypostswidget-3" title="5">5</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=6#lcp_instance_listcategorypostswidget-3" title="6">6</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=7#lcp_instance_listcategorypostswidget-3" title="7">7</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=8#lcp_instance_listcategorypostswidget-3" title="8">8</a></li><li class="lcp_currentpage">9</li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=10#lcp_instance_listcategorypostswidget-3" title="10">10</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=11#lcp_instance_listcategorypostswidget-3" title="11">11</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=12#lcp_instance_listcategorypostswidget-3" title="12">12</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=13#lcp_instance_listcategorypostswidget-3" title="13">13</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=14#lcp_instance_listcategorypostswidget-3" title="14">14</a></li><li><a href="https://atmokpo.com/w/category/swift-coding-test/page/5/?lcp_pagelistcategorypostswidget-3=10#lcp_instance_listcategorypostswidget-3" title="10" class="lcp_nextlink">&gt;&gt;</a></li></ul></section><section id="block-3" class="widget widget_block"> <div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow"> <h3 class="wp-block-heading">최신 글</h3> <ul class="wp-block-latest-posts__list wp-block-latest-posts"><li><a class="wp-block-latest-posts__post-title" href="https://atmokpo.com/w/37979/">Unity 2D Game Development, Create a Platform Game Including Jumps, Obstacles, and Enemies.</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://atmokpo.com/w/37977/">Unity 2D Game Development, Adding Effects Using Particle System Implementing visual effects such as explosions and flames using the particle system.</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://atmokpo.com/w/37973/">Unity 2D Game Development, Touch Input and Mobile Game Development Creation of 2D games utilizing touch input on mobile devices.</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://atmokpo.com/w/37975/">Unity 2D Game Development, Power-Up and Buff System Creating a power-up system that temporarily enhances the player’s abilities.</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://atmokpo.com/w/37971/">Unity 2D Game Development, Quest and Mission System Creating a quest system where rewards are given for achieving specific goals.</a></li> </ul></div></div> </section> </aside><!-- .sidebar .widget-area --> </code>
<code> <footer id="colophon" class="site-footer"> <div class="site-info"> <span class="site-title"><a href="https://atmokpo.com/w/en/" rel="home">라이브스마트</a></span> <a href="https://wordpress.org/" class="imprint"> Proudly powered by WordPress </a> </div><!-- .site-info --> </footer><!-- .site-footer --> </code>
<code> </code>
<code> <link rel="stylesheet" id="lcp_paginator-css" href="https://atmokpo.com/w/wp-content/plugins/list-category-posts//lcp_paginator.css?ver=6.7.2" media="all"> <script src="https://atmokpo.com/w/wp-content/plugins/collapse-magic/js/collapse-magic.js?x=168&amp;ver=1.0" id="claps-main-js"></script> <script defer="" src="https://atmokpo.com/w/wp-content/plugins/koko-analytics/assets/dist/js/script.js?ver=1.6.4" id="koko-analytics-js"></script> <script src="https://atmokpo.com/w/wp-content/plugins/responsive-accordion-and-collapse/js/accordion-custom.js?ver=6.7.2" id="call_ac-custom-js-front-js"></script> <script src="https://atmokpo.com/w/wp-content/plugins/responsive-accordion-and-collapse/js/accordion.js?ver=6.7.2" id="call_ac-js-front-js"></script> <script src="https://stats.wp.com/e-202515.js" id="jetpack-stats-js" data-wp-strategy="defer"></script> <script id="jetpack-stats-js-after"> _stq = window._stq || []; _stq.push([ "view", JSON.parse("{\"v\":\"ext\",\"blog\":\"238449126\",\"post\":\"0\",\"tz\":\"0\",\"srv\":\"atmokpo.com\",\"j\":\"1:14.2.1\"}") ]); _stq.push([ "clickTrackerInit", "238449126", "0" ]); </script> <script> document.querySelectorAll("code").forEach(function(codeBlock) { // 내용에 '<'나 '>'가 포함된 경우에만 변환 if (codeBlock.innerHTML.includes("<") && codeBlock.innerHTML.includes(">")) { codeBlock.textContent = codeBlock.innerHTML; } }); </script></code>