Sobes.tech

What is the main difference between using the map and flatMap methods in the Stream API when processing data streams?

Junior — Middle
147

List<Integer> getNonUnique(int[] one, int[] two) { Map<Integer, Integer> freqOne = new HashMap<>(); Map<Integer, Integer> freqTwo = new HashMap<>(); for (int num : one) { freqOne.put(num, freqOne.getOrDefault(num, 0) + 1); } for (int num : two) { freqTwo.put(num, freqTwo.getOrDefault(num, 0) + 1); } List<Integer> result = new ArrayList<>(); for (Integer key : freqOne.keySet()){ if (freqTwo.containsKey(key)) { result.add(key); } } return result; } //one [phone] //two 3 9 8 1 // result 1 3 //one [phone] //two 3 9 8 1 3 // result 1 3 3

147

What types of tasks have you solved in your previous positions and how can they be characterized?

Junior — Middle
146

When creating an index for a large table, does it affect the ability to read data from it during its construction?

Junior — Middle
145

What methods are used to store external configuration data in applications?

Junior — Middle
144

table student id PK name faculty_id table faculty id PK name SELECT f.name, count(*) FROM faculty f JOIN student s ON s.faculty_id = f.id GROUP BY f.id, f.name GROUP BY /*f.id,*/ f.name GROUP BY f.id/*, f.name*/

143

Are you able to work with the OpenShift platform and apply it in projects?

Junior — Middle
141

table student id PK name faculty_id table faculty id PK name SELECT f.name FROM faculty f JOIN student s ON s.faculty_id = f.id GROUP BY f.id, f.name ORDER BY COUNT(s.id) DESC LIMIT 1;

141

Tell us how you have applied OpenShift in your last project.

Junior — Middle
139

In what cases are default @Transactional settings insufficient?

138

How to ensure that a Scheduled Job runs only on one instance out of 20 in a cluster?

134

table employee id bigint PK not null employee_name varvhar(100) not null employee_number int4 not null id; employee_name; employee_number 1000; Ivanov; 123 WITH ordered AS ( SELECT employee_number, LAG(employee_number) OVER (ORDER BY employee_number) as prev_number FROM employee ) SELECT prev_number + 1 as missing_number FROM ordered WHERE employee_number - prev_number > 1; 1000; name1; 1 1001; name2; 2 1002; name3; 4 1003; name4; 5 with ordered as () select * from ordered

131

List<String> getNonUnique(int[] one, int[] two) { } //one 1 3 7 5 2 //two 3 9 8 1 // result 1 3

125

How to implement a seat reservation system in a cinema without double sales? What type of locking to choose?

124

Tell me about your experience at your last job. What was your contribution?

123

SELECT COUNT(DISTINCT employee_number) = COUNT(*) FROM employees

113
/9