Skip to content

Instantly share code, notes, and snippets.

View RaminMammadzada's full-sized avatar
🔬
Engineering is a wonderful thing if one does not have to earn one's living at it

Ramin RaminMammadzada

🔬
Engineering is a wonderful thing if one does not have to earn one's living at it
View GitHub Profile
@RaminMammadzada
RaminMammadzada / sample_project_secure_online_bookstore_with_jenkins_cicd.md
Created May 17, 2023 09:15
Sample Project: Secure Online Bookstore with Jenkins CI/CD

Sure, let's create a take-home assignment that builds on the previous project, incorporating Continuous Integration/Deployment with Jenkins, and providing more detailed instructions.

Project: Secure Online Bookstore with Jenkins CI/CD

Objective: Implement a secure RESTful API for an Online Bookstore using Java, Spring Boot, Apache Kafka. The bookstore should allow users to view, add, update, and delete books, and place orders that are processed asynchronously through a message queue. Use Jenkins for Continuous Integration and Deployment.

Requirements and Instructions:

  1. Initialize a Spring Boot project: Use Spring Initializr to create a new Spring Boot project. For dependencies, select: Web, JPA, H2, Cache, Spring for Apache Kafka, Spring Security, Spring AOP, and Lombok.
@RaminMammadzada
RaminMammadzada / sample_project_secure_ecommerce_order_processing_system_with_cicd.md
Created May 17, 2023 09:15
Project: Secure E-commerce Order Processing System with CI/CD

Project: Secure E-commerce Order Processing System with CI/CD

Objective: Implement a secure RESTful API for an E-commerce Order Processing System using Java, Spring Boot, Apache Kafka, and GitHub Actions (for CI/CD). The system should allow users to place orders and process them asynchronously through a message queue.

Requirements:

  1. Initialize a new Spring Boot project using Spring Initializr. Choose the following dependencies: Web, JPA, H2, Cache, Spring for Apache Kafka, Spring Security, Spring AOP, and Lombok.

  2. Structure your project with the following packages:

  • model: Contains domain model classes (Product, Order, User)
@RaminMammadzada
RaminMammadzada / sample_project_ecommerce_order_processing_system.md
Created May 17, 2023 09:14
Sample Project: E-commerce Order Processing System

Project: E-commerce Order Processing System

Objective: Implement a RESTful API for an E-commerce Order Processing System using Java, Spring Boot, and Apache Kafka. The system should allow users to place orders and process them asynchronously through a message queue.

Requirements:

  1. Initialize a new Spring Boot project using Spring Initializr. Choose the following dependencies: Web, JPA, H2, Cache, Spring for Apache Kafka, and Lombok.

  2. Structure your project with the following packages:

    • model: Contains domain model classes (Product, Order)
@RaminMammadzada
RaminMammadzada / sample_project_customer_management_system_api.md
Created May 17, 2023 09:13
Sample Project: Customer Management System API

Project: Customer Management System API

Objective: Implement a RESTful API for a Customer Management System using Java and Spring Boot. The API should allow users to perform CRUD (Create, Read, Update, Delete) operations on customers.

Requirements:

  1. Initialize a new Spring Boot project using Spring Initializr. Choose the following dependencies: Web, JPA, H2, Lombok, and Spring Data REST.

  2. Structure your project with the following packages:

  • model: Contains domain model classes (Customer)
@RaminMammadzada
RaminMammadzada / sample_project_weather_forecasting_system_api.md
Created May 17, 2023 09:12
Sample Project: Weather Forecasting System API

Absolutely! For the caching requirement, let's create a take-home assignment that involves building a caching layer into a weather forecasting API.

Project: Weather Forecasting System API

Objective: Implement a RESTful API for a Weather Forecasting System using Java, Spring Boot, and a caching mechanism. The API should allow users to request current weather forecasts for different cities and cache the results to improve performance.

Requirements:

  1. Initialize a new Spring Boot project using Spring Initializr. Choose the following dependencies: Web, JPA, H2, Cache, and RestTemplate.
@RaminMammadzada
RaminMammadzada / sample_project_flight_booking_system_api.md
Created May 17, 2023 09:11
Sample Project: Flight Booking System API

Project: Flight Booking System API

Objective: Implement a RESTful API for a Flight Booking System using Java and Spring Boot. The API should allow users to perform CRUD (Create, Read, Update, Delete) operations on flights and passengers and to book flights.

Requirements:

  1. Initialize a new Spring Boot project using Spring Initializr. Choose the following dependencies: Web, JPA, H2, and Lombok.

  2. Structure your project with the following packages:

    • model: Contains domain model classes (Flight, Passenger, Booking)
@RaminMammadzada
RaminMammadzada / sample_project_online_book_store_api.md
Created May 17, 2023 09:09
Sample Project: Online Book Store API

Project: Online Book Store API

Objective: Implement a RESTful API for an online book store using Java and Spring Boot. The API should allow users to perform CRUD (Create, Read, Update, Delete) operations on books and authors.

Requirements:

  1. Create a new Spring Boot project using Spring Initializr. Include the following dependencies: Web, JPA, and H2.
  2. Set up the project with the following structure:
    • model package: containing the domain model classes (e.g., Book, Author)
    • repository package: containing the repository interfaces extending JpaRepository
@RaminMammadzada
RaminMammadzada / CodeSignal-addTwoHugeNumbers.txt
Created December 3, 2021 11:04
CodeSignal-addTwoHugeNumbers
You're given 2 huge integers represented by linked lists. Each linked list element is a number from 0 to 9999 that represents a number with exactly 4 digits. The represented number might have leading zeros. Your task is to add up these huge integers and return the result in the same format.
Example
For a = [9876, 5432, 1999] and b = [1, 8001], the output should be
solution(a, b) = [9876, 5434, 0].
Explanation: 987654321999 + 18001 = 987654340000.
For a = [123, 4, 5] and b = [100, 100, 100], the output should be
@RaminMammadzada
RaminMammadzada / CodeSignal-removeKFromList.txt
Created December 3, 2021 08:13
CodeSignal-removeKFromList
Note: Try to solve this task in O(n) time using O(1) additional space, where n is the number of elements in the list, since this is what you'll be asked to do during an interview.
Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k.
Example
For l = [3, 1, 2, 3, 4, 5] and k = 3, the output should be
solution(l, k) = [1, 2, 4, 5];
For l = [1, 2, 3, 4, 5, 6, 7] and k = 10, the output should be
solution(l, k) = [1, 2, 3, 4, 5, 6, 7].
A cryptarithm is a mathematical puzzle for which the goal is to find the correspondence between letters and digits, such that the given arithmetic equation consisting of letters holds true when the letters are converted to digits.
You have an array of strings crypt, the cryptarithm, and an an array containing the mapping of letters and digits, solution. The array crypt will contain three non-empty strings that follow the structure: [word1, word2, word3], which should be interpreted as the word1 + word2 = word3 cryptarithm.
If crypt, when it is decoded by replacing all of the letters in the cryptarithm with digits using the mapping in solution, becomes a valid arithmetic equation containing no numbers with leading zeroes, the answer is true. If it does not become a valid arithmetic solution, the answer is false.
Note that number 0 doesn't contain leading zeroes (while for example 00 or 0123 do).
Example