What is the difference between a stack and a queue?
Example:
Stack: Undo functionality in software. Queue: Print job scheduling.
保存以便复习
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。
了解热门 Computer Science 面试题与答案,帮助应届生和有经验的候选人为求职面试做好准备。
了解热门 Computer Science 面试题与答案,帮助应届生和有经验的候选人为求职面试做好准备。
搜索问题以查看答案。
Example:
Stack: Undo functionality in software. Queue: Print job scheduling.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Creating an index on a 'username' column for faster search queries.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Java constructor: 'public MyClass(int value) { this.value = value; }'
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Closing a file or database connection in the 'finally' block.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Singly linked list: Node1 -> Node2 -> Node3. Doubly linked list: Node1 <-> Node2 <-> Node3.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Searching for a specific element in a sorted array by repeatedly halving the search range.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
In Java: 'this.name = name;' in a constructor to differentiate between instance and local variables.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Using 'git commit' to save changes and 'git push' to update the remote repository.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Using a weather API to retrieve current weather data in a web application.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Binary search trees are a common application of binary trees for efficient searching.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Fetching all columns from a 'users' table: 'SELECT * FROM users;'
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Ensuring resources are released in the 'finally' block, even if an exception occurs.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Refactoring repeated code into a function for reusability.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Static method: Math.abs() in Java. Instance method: String.length() in Java.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Merging feature branch changes into the main branch: 'git checkout main; git merge feature-branch;'
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Blocking unauthorized access to a private network from external sources.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Finding the shortest path in an unweighted graph or exploring the relationships in a social network.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Accessing a website using its domain name (e.g., www.example.com) rather than its IP address.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Method overloading: Same method name with different parameters. Method overriding: Subclass provides a specific implementation of a method defined in its superclass.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
O(n^2) for a nested loop algorithm.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Process: Multiple instances of a web browser. Thread: Handling multiple tasks in a music player concurrently.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Using disk space as an extension of RAM when physical memory is full.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
TCP: File transfer. UDP: Real-time video streaming.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Shallow copy: Object.assign() in JavaScript. Deep copy: Using libraries like deepcopy in Python.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Breaking a table into smaller tables to avoid repeating data (1NF, 2NF, 3NF, etc.).
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Using locks or synchronization primitives to control access to shared data in a multithreaded environment.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Storing key-value pairs in a hash table for fast lookup times.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Calculating the factorial of a number or traversing a directory structure recursively.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Java's automatic garbage collection using the JVM's garbage collector.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Synchronous: Blocking function calls. Asynchronous: Using callbacks or promises in JavaScript.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Building web applications with frameworks like Django (Python) or Ruby on Rails (Ruby).
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Using Hibernate in Java to map Java objects to database tables.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Training a neural network to recognize handwritten digits in an image.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Declaring a variable as 'volatile' in Java for thread safety.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Building a large-scale web application with independent services for authentication, payment, and user management.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Creating a single instance for a database connection manager in a web application.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Using a cache to store frequently accessed database query results for improved performance.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Running background tasks while the main thread handles user input in a graphical user interface.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Finding the shortest path between two cities on a road network.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Java Virtual Machine (JVM) enables Java programs to run on any device with a JVM installed.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Processing and analyzing large log files to extract relevant information in Hadoop.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Implementing priority queues for tasks with varying levels of priority.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Implementing event handling in graphical user interfaces.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Choosing between consistency and availability during network partitions in a distributed database system.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Allowing a mobile app to access a user's Google Drive without sharing the password.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Extending the functionality of a text editor with spell-checking or formatting capabilities.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Implementing undo functionality in a text editor using command objects.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Creating a single instance for a database connection manager in a web application.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Implementing event handling in graphical user interfaces.
收藏此条目、标记为困难题,或将其加入复习集合。
Example:
Building a cross-platform mobile app using frameworks like Xamarin.
收藏此条目、标记为困难题,或将其加入复习集合。