투잡뛰는 개발 노동자

[Non-Computer Science Major, Surviving as a Developer] 14. Summary of Frequently Asked Technical Interview Questions for Junior Developers

Created: 2024-04-03

Created: 2024-04-03 20:38

Surviving as a Non-Computer Science Graduate Developer


#14. Frequently Asked Technical Interview Questions for Junior Developers


[Main Memory Areas]

  • Code Segment: The area where the program's source code is stored. The CPU fetches instructions (source code, functions, control statements) stored in the code segment and processes them. For example, when a program written in C is executed, the code segment stores the source code of that program.
  • Data Segment: The area where global variables and static variables are stored. It is allocated at the start of the program and remains until the program terminates. For example, when a program written in C is executed, the data segment stores global variables or static variables declared in that program.
  • Stack Segment: A temporary memory area used by the program. It stores local variables and parameters related to function calls. It is allocated upon function call and destroyed when the function ends. For example, when a function written in C is called, the local variables or parameters used in that function are allocated to the stack segment.
  • Heap Segment: The area where users dynamically allocate and deallocate memory space. For example, when memory is dynamically allocated using the malloc() function in C, the allocated memory area is stored in the heap segment.

[Data Structures]

  • Stack: A data structure that follows the Last-In, First-Out (LIFO) principle. For example, the 'Back' button on a computer is similar to a stack. Previously visited pages are stored in the stack, and when the 'Back' button is pressed, the most recently stored page is retrieved and displayed.
  • Queue: A data structure that follows the First-In, First-Out (FIFO) principle. For example, receiving a queuing number at a bank and waiting in line is similar to a queue. The first person to arrive is served first, and the last person to arrive is served last.
  • Tree: A data structure that represents data in a hierarchical structure. For example, the HTML DOM tree is similar to a tree. The structure of an HTML page is represented as a tree, starting from the root node, the html tag, and subsequently displaying child nodes.
  • Heap: One of the binary tree structures, categorized into max heap and min heap. For example, in a priority queue, the data with the highest priority is located at the root node of the heap, and the data with the next highest priority is located in the child nodes, which is an example of a max heap.

[RDBMS and NoSQL]

  • RDBMS (Relational Database Management System): A database that structurally defines and manages data with a strict schema. Data can be stored in a distributed manner, and modifications are easy. For example, MySQL, Oracle, and MS-SQL are representative examples of RDBMS.
  • NoSQL: A database that stores and manages data with a flexible schema. It is suitable for processing and storing large volumes of data, and has high scalability. For example, MongoDB, Cassandra, and HBase are representative examples of NoSQL.

[Procedural and Object-Oriented]

  • Procedural Programming: A programming paradigm that emphasizes sequential processing. Languages like C and Pascal are procedural languages.
  • Object-Oriented Programming: A method of logically bundling data and procedures based on the concept of Objects. Languages like Java, C++, and Python are object-oriented languages. For example, in a car simulation program, a car is represented as an object, and its attributes (color, acceleration, etc.) are represented as data, while its functions (driving, stopping, etc.) are represented as methods.

[Overriding and Overloading]

  • Overriding: Redefining a method possessed by a parent class in a child class and using it. When a method in the parent class is called from the child class, the overridden method in the child class is executed instead of the method in the parent class. For example, the toString() method in Java is an example of Overriding.
  • Overloading: Defining multiple methods with the same name but with different parameter types and numbers to respond to various types of calls. Multiple methods with different parameters but the same name operate. For example, the print() method in Java is an example of Overloading.

[Page Replacement Algorithms]

  • FIFO (First-In, First-Out): Replaces the page that has been loaded into physical memory for the longest time. Closing tasks from the taskbar on a computer is similar to the FIFO algorithm. The first program launched is displayed last and closed, similar to the process.
  • LRU (Least Recently Used): Replaces the page that has not been used for the longest time. An 'app termination app' that terminates old, infrequently used apps is also similar to the LRU algorithm.
  • LFU (Least Frequently Used): Replaces the page with the fewest references. For example, the 'tab closing' feature that closes the least-used tabs among newly opened tabs in a browser is also similar to the LFU algorithm.
  • MFU (Most Frequently Used): Replaces the page with the most references. The MFU algorithm is not commonly used.

[Process and Thread]

  • Process: An execution unit allocated by the operating system, representing a program. When multiple processes are executed simultaneously, each process is allocated independent memory and CPU resources.
  • Thread: An execution unit that operates within a process. Threads share the resources allocated to the process and execute concurrently. For example, each tab in a web browser operates as a thread, not a process.

[OSI 7-Layer Model]

  • Application Layer: The layer that connects the user to the network. Protocols such as HTTP, FTP, and SMTP belong to this layer.
  • Presentation Layer: The layer that defines the data representation format. Protocols such as JPEG, MPEG, and SSL belong to this layer.
  • Session Layer: The layer that manages the session between two communicating systems.
  • Transport Layer: The layer responsible for data transmission. Protocols such as TCP and UDP belong to this layer.
  • Network Layer: The layer that establishes the path for data transmission. Protocols such as IP and ICMP belong to this layer.
  • Data Link Layer: The layer that transmits data based on physical addresses (MAC addresses). Protocols such as Ethernet and Token Ring belong to this layer.
  • Physical Layer: The layer responsible for physical connections and communication related to the transmission medium.

[TCP and UDP]

  • TCP (Transmission Control Protocol): A connection-oriented service that transmits data reliably. It establishes or terminates connections through the 3-way handshake and 4-way handshake methods. For example, when logging in to a website or transferring files, TCP is used.
  • UDP (User Datagram Protocol): A connectionless service that does not go through a signaling procedure for data transmission. It has low data reliability but is characterized by fast processing speeds. For example, video streaming and online games prioritize fast transmission, so UDP is used.

Comments0