Jobs
Interviews

Editorialist Yx

Editorialist YX is a luxury fashion marketplace that provides a personalized shopping experience, combining editorial content with e-commerce. It connects high-end brands with consumers through curated collections and fashion insights.

Interview Questions for Editorialist Yx

1. Chocolate Distribution Problem You are given an array/list CHOCOLATES of size 'N', where each element represents the number of chocolates in a packet. Your task is to distribute these chocolates among 'M' students such that: Each student receives at least one packet of chocolates. The difference between the largest and smallest number of chocolates in the distributed packets is minimized. Input: T: number of test cases For each test case: N M: two space-separated integers denoting the number of packets and number of students CHOCOLATES: 'N' space-separated integers representing chocolates in each packet Output: For each test case, print the minimum possible difference between the maximum and minimum number of chocolates in packets, distributed to students. Example: Input: T = 1 N = 5, M = 3 CHOCOLATES = [8, 11, 7, 15, 2] Output: 4 Constraints: 1 <= T <= 50 2 <= M <= N <= 10^4 1 <= CHOCOLATES[i] <= 10^9 Note: You are not required to print anything. Implement the given function to return the required result.

2. Palindrome Linked List Problem Statement You are provided with a singly linked list of integers. Your task is to determine whether the given singly linked list is a palindrome. Return true if it is a palindrome, otherwise return false. Example: Input: 1 -> 2 -> 3 -> 2 -> 1 -> NULL Output: true Explanation: The given linked list maintains the same sequence of elements when traversed forwards and backwards, hence it is a palindrome. Constraints: 1 <= T <= 10 0 <= L <= 10^5 1 <= data <= 10^9 (and data != -1) Input: The first line of input contains an integer 'T' representing the number of test cases. For each test case, the only line contains the elements of the singly linked list separated by a space, ending with -1. Note that -1 is not part of the list. Output: For each test case, output 'true' or 'false' in a new line, indicating whether the linked list is a palindrome or not. Note: You do not need to print anything as it is managed within the implementation. Simply complete the provided function. Follow Up: Can you devise a solution with O(N) time complexity and O(1) space complexity iteratively?

3. LRU Cache Design Question Design a data structure for a Least Recently Used (LRU) cache that supports the following operations: 1. get(key) - Return the value of the key if it exists in the cache; otherwise, return -1.2. put(key, value) - Insert the value in the cache if the key is not present or update the value if the key is already present. If the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item. Input: The first line of input contains two space-separated values 'C' and 'Q', representing the capacity of the cache and the number of operations, respectively. The next 'Q' lines contain operations: - Starts with an integer indicating the type of operation. - Type 0: Followed by a single integer key. - Type 1: Followed by two space-separated integers key and value. Output: For each type 0 operation, print the value if the key exists in the cache; otherwise, print -1. Example: Sample Input: 3 111 1 11 2 21 3 31 4 50 30 10 41 2 30 10 30 2 Sample Output: 3-15-133 Explanation: With capacity 3, operations occur as follows: - put(1,1) - put(2,2) - put(3,3) - put(4,5) - Evicts key 1 as it's the least recently used. - get(3) returns 3 - get(1) returns -1 - get(4) returns 5 - put(2,3) updates key 2 - get(1) returns -1 - get(3) returns 3 - get(2) returns 3 Constraints: 1 ≤ C ≤ 10^4 1 ≤ Q ≤ 10^5 1 ≤ key, value ≤ 10^9 Time Limit: 1 sec

4. How would you automate data processing in files?

5. Explain your automation framework.

Editorialist Yx

E-commerce and Fashion

New York

51-200 Employees

cta

Start Your Job Search Today

Browse through a variety of job opportunities tailored to your skills and preferences. Filter by location, experience, salary, and more to find your perfect fit.

Job Application AI Bot

Job Application AI Bot

Apply to 20+ Portals in one click

Download Now

Download the Mobile App

Instantly access job listings, apply easily, and track applications.