Sobes.tech

What is MCP and how does it work?

Senior
192

/** * Find the person with the minimum age in a room with the maximum number of people * At the end of the solution method, call writeSolution(user, room) */

Senior
192

How to solve the problem with NFT 50ms at current RT 150ms + 350ms? Suggest an architectural solution.

Middle
192

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*/

192

Have you worked with locks in databases? How did you acquire locks?

Senior
192

What are functional interfaces? Which ones do you know? What do they accept and what do they return?

Middle
192

What is the difference between map and flatMap in the Stream API?

Senior
192

What does the reduce method do?

Senior
192

[name] asked: what databases have you worked with? Postgres, Redis — that's clear, but what about non-relational ones like MongoDB or others?

Middle+
192

Why did you use Spring Web for API Gateway instead of ready-made proxy solutions like Nginx, Envoy?

192

The database is large, indexes are built, the plan has been reviewed — what else can be done for optimization?

Senior
192

How do LinkedList and HashMap differ? How does LinkedHashMap differ from HashMap?

Senior
192

Have you ever explained to a client or analyst why a task takes 2 days instead of 10?

192

What approaches do you use for versioning REST API to ensure compatibility between different clients, and what difficulties have you faced?

192

```java import java.util.*; import java.lang.*; import java.io.*; class Codechef { public static void main (String[] args) throws java.lang.Exception { var autoNumbers = List.of(List.of("A123BC", "B421FT"), List.of("O543EC","B421FT", "I222OA")); autoNumbers.stream().flatMap(Collection::stream).flatEach(System.out/System.out.println()); Map<String, String> numberMap = autoNumbers.stream().flatMap(Collection::stream).collect(Collectors.toMap( n -> n, n -> n.replaceAll("[^0-9]", ""))); System.out.println(numberMap); } } ```

192

Tell about what you have translated from synchronous to asynchronous mode and why it was done.

192

@Data @Entity @Table(name = "_store") public static class Book { @Id private String id; private String title; private String author; private int price; @Transient private String tmp; @Enumerated(EnumType.STRING) private BookType type; } public enum BookType { COMMON, PREMIUM; }

192

```java // 2 public class Interfaces { public static void main(String[] args) { A a = new A() {}; B b = new B() {}; AB ab = new AB(); a.print(); b.print(); ab.print(); } public interface A { default void print() { System.out.println("interface A"); } } public interface B extends A { default void print() { System.out.println("interface B"); } } public static class AB implements A, B { } } ```

Senior
192
/730