ServiceNow计算机科学面试真题

职位分类
全部
数据相关
计算机科学
人工智能
产品经理
BQ
面试题
全部(90)
OOD(29)
Algorithm(30)
System Design(18)
高频题(0)
Math(0)
全部(90)
OOD(29)
Algorithm(30)
System Design(18)
高频题(0)
Math(0)
1.Debugging and Refactoring Code Kata
2.Implement a Custom HashMap
3.Debug and Refactor OOD Code
4.Design a HashSet
5.File Sorting with Limited Memory
6.Data Structures and Operations
7.Finding Duplicates in a Vector
8.Algorithm to Find the Closest Locations
9.Design a C++ String Class
10.In-Place Algorithm to Sort a Linked List
11.Implement a HashMap
12.Reorder Linked List in a Specific Sequence
13.Find the First Element Whose Value Equals Its Index in a Sorted Array
14.Understanding Deadlocks
15.Construct Binary Tree from Preorder and Inorder Traversal
16.Convert Integer to String and Vice Versa
17.Object-Oriented Design
18.Coding Exercise: Reverse String
19.Coding Exercise: FizzBuzz
20.Java Basics
21.Design a Messaging Application
22.Implement a CustomHashMap
23.Debug and Refactor the Tennis Scoring Program
24.Solve the 2-sum problem (input array not sorted) with an optimal solution.
25.Solve algorithm problems LC 3 and a variant of LC 50 using only addition.
26.Find the minimum difference between two numbers in two sorted arrays.
27.Implement a backend GET API and discuss error handling in JavaScript.
28.Solve algorithm problem LC 39.
29.Solve algorithm problem LC 867.
30.How can a server associate products added to a shopping cart by a user in a stateless request scenario without the user being logged in?
31.Discuss HTTP concepts such as REST API and AJAX.
32.Explain the concept of immutability in Java and how to make a class immutable.
33.CSS Preprocessor Usage
34.Calculate Total Payment for Employees
35.Check for Class Methods and Properties
36.Functional Programming Concepts
37.Difference Between 'new Object()' and 'Object.create()'
38.Class Creation in JavaScript
39.Analyze Hoisting in JavaScript
40.Convert Number to English Words
41.Implement a 'contains' Method
42.Design a Vending Machine
43.Data Structures in Java: TreeSet vs. ArrayList
44.Data Structures in Java: Set vs. List
45.Data Structures in Java: Array vs. ArrayList
46.FizzBuzz Implementation
47.Determine the overlap of two time slots.
48.Design an elevator system.
49.Explain basic concepts such as class, object, encapsulation, and static.
50.Print Organizational Structure
51.Flatten JSON Array
52.Object-Oriented Programming Concepts
53.Implement a HashMap with O(1) Get Operation
54.Implement preOrder and postOrder Traversal for a B-Tree in Java
55.Maximize Product of Five Numbers in an Array
56.Linkedlist Middle Node and Loop Detection
57.Basic Binary Search
58.Count and Say Problem
59.Basic Knowledge Questions
60.JavaScript Design: MySet Implementation
61.Java Design: Roman To Integer Converter
62.Design a CSV File Reader and Calculator
63.Find First Missing Positive Number
64.Move Zeroes to the Right
65.Match Nuts and Bolts Optimally
66.Debugging a File Directory Implementation in JavaScript
67.Optimize the Service for High Traffic
68.Handle Distance Calculation for Multiple Users
69.Convert the Solution to Object-Oriented Design
70.Find the Closest Coffee Shops
71.Modified 2Sum Problem
72.Terminal commands to list all Java processes
73.How to check if a user form is filled out correctly
74.How to verify the validity of a Social Security Number (SSN)
75.Write test cases for different fields considering character length and type
76.Find All Pairs in an Integer Array with Sum Equal to a Target Value
77.Troubleshooting a Hanging Process
78.How would you design a deck of playing cards in a database?
79.What are the principles of Object-Oriented Programming (OOP)?
80.What is polymorphism in computer science?
81.Design a query function for an unsorted array to find the minimum value within a given range
82.Algorithm to find the minimum absolute difference between elements of two sorted arrays
83.Implement a JavaScript function to extend all arrays with a method to get the cube of their elements
84.Matrix Zeroes Problem
85.Object-Oriented Design: Elevator System
86.Design Patterns Knowledge
87.Java Versions: Differences between Java 7 and Java 8
88.Data Structures: Stack vs Queue
89.Valid Words Count in a String
90.System Design Interview
1. Debugging and Refactoring Code Kata
You are presented with a piece of code that represents the scoring system of a tennis match. Your task is to identify any bugs in the code and then refactor the code to improve readability and possibly other aspects of the code quality.
2. Implement a Custom HashMap
Implement a custom HashMap. You are given the basic class structure and are required to implement the hash() and put() functions.
3. Debug and Refactor OOD Code
You are given a piece of Java OOD code representing a game that requires certain functionalities. The current design has some issues that need to be addressed. Identify and fix approximately three to four bugs related to boundary conditions. After debugging, refactor the code to eliminate redundancy by extracting common code into separate methods.
4. Design a HashSet
Design a HashSet with the following operations: put, delete, and calculate hash. Explain each part, run test cases, and discuss why MD5 is used for the calculate hash operation and what other methods could be used. After completing the design, discuss whether it is thread-safe and if not, how to modify the code to make it thread-safe. Mention the use of synchronized and briefly explain the idea of using a mutex to handle race conditions without writing specific code.
5. File Sorting with Limited Memory
Given an input file containing city names, how would you output a file with sorted city names? Optimize your solution for a scenario where only 10MB of RAM is available.