Sr Developer Interview Questions

30,106 sr developer interview questions shared by candidates

Most of the round concentrated on React. 1) How react routers will work 2) How to create dynamic routers 3) How to create 404 page 4) React life cycle questions 5) Difference between bind, call and Apply 6) Function borrowing 7) Program related to JS objects 8) Async n await 9) What is super in react component
avatar

Senior Frontend Developer

Interviewed at Altimetrik

3.9
May 10, 2021

Most of the round concentrated on React. 1) How react routers will work 2) How to create dynamic routers 3) How to create 404 page 4) React life cycle questions 5) Difference between bind, call and Apply 6) Function borrowing 7) Program related to JS objects 8) Async n await 9) What is super in react component

You are given an array of words (strings) and an integer k k k. Your task is to write a function that returns the k k k longest words from the array. If there are fewer than k k k words in the array, return all the words sorted by length in descending order. If there are ties in length, return the words in alphabetical order. Input: An array of strings words[] where each string consists of lowercase and uppercase letters only. An integer k k k (1 ≤ k k k ≤ 100). Output: An array of the k k k longest words, sorted by length (and alphabetically if lengths are equal). Example: plaintextInput: words = ["apple", "banana", "kiwi", "grape", "watermelon"], k = 3 Output: ["watermelon", "banana", "apple"] Input: words = ["cat", "bat", "rat"], k = 5 Output: ["bat", "cat", "rat"] Constraints: The output array should not exceed k k k elements. You may assume that the input will always have at least one word.
avatar

Senior Java Developer

Interviewed at Apple

4.1
Apr 18, 2025

You are given an array of words (strings) and an integer k k k. Your task is to write a function that returns the k k k longest words from the array. If there are fewer than k k k words in the array, return all the words sorted by length in descending order. If there are ties in length, return the words in alphabetical order. Input: An array of strings words[] where each string consists of lowercase and uppercase letters only. An integer k k k (1 ≤ k k k ≤ 100). Output: An array of the k k k longest words, sorted by length (and alphabetically if lengths are equal). Example: plaintextInput: words = ["apple", "banana", "kiwi", "grape", "watermelon"], k = 3 Output: ["watermelon", "banana", "apple"] Input: words = ["cat", "bat", "rat"], k = 5 Output: ["bat", "cat", "rat"] Constraints: The output array should not exceed k k k elements. You may assume that the input will always have at least one word.

Viewing 2331 - 2340 interview questions

Glassdoor has 30,106 interview questions and reports from Sr developer interviews. Prepare for your interview. Get hired. Love your job.