Wissen Technology
10+ NYK Logistics (UK) Interview Questions and Answers
Q1. design a deck of card and tell who is the higher bidder
Design a deck of cards and determine the higher bidder
Design a deck of 52 cards with 4 suits (hearts, diamonds, clubs, spades) and 13 ranks (2-10, J, Q, K, A)
Assign a value to each rank (e.g. 2 = 2, 3 = 3, ..., J = 11, Q = 12, K = 13, A = 14)
Determine the higher bidder based on the rules of the game being played (e.g. highest card wins, poker hand rankings, etc.)
Q2. Primary key, difference between primary key and super key
Primary key uniquely identifies a record in a table, while super key is a set of attributes that can uniquely identify a record.
Primary key is a subset of super key
Primary key cannot have NULL values, while super key can
Example: In a table 'Employee', 'EmployeeID' can be a primary key as it uniquely identifies each employee record, while 'EmployeeID, DepartmentID' can be a super key
Q3. Print prime numbers, implement linked list, perform binary search on array
Implementing prime number printing, linked list, and binary search on array in software development interview question.
Implement a function to print prime numbers within a given range
Create a linked list class with basic operations like insertion, deletion, and traversal
Write a binary search function to find a target value in a sorted array
Q4. Prime number optimisation and why ?
Optimizing prime number algorithms is crucial for efficient computation in software development.
Optimizing prime number algorithms can improve the performance of applications that rely on prime numbers, such as cryptography or number theory.
Efficient algorithms like the Sieve of Eratosthenes can significantly reduce the time complexity of finding prime numbers.
Using techniques like memoization or dynamic programming can further optimize prime number generation.
Optimizing prim...read more
Q5. constructors and overridding of functions in hashmap
Constructors are used to initialize objects, while overriding functions in HashMap allows custom behavior for key-value pairs.
Constructors in HashMap are used to initialize the HashMap object with a specified initial capacity and load factor.
Overriding functions in HashMap allows custom behavior for methods like put(), get(), and remove().
Example: Overriding the put() method in a custom HashMap implementation to perform additional validation before adding a key-value pair.
Q6. Create a React application based on the given requirements
Create a React application based on given requirements
Start by setting up a new React project using create-react-app
Identify the components needed based on the requirements
Implement state management using React hooks or Redux
Fetch data from an API if required and display it in the application
Ensure responsive design and user-friendly interface
Q7. What is abstraction and encapsulation
Abstraction is the concept of hiding complex implementation details and showing only the necessary information. Encapsulation is bundling data and methods that operate on the data into a single unit.
Abstraction focuses on what an object does rather than how it does it
Encapsulation restricts access to some of an object's components, protecting the object's integrity
Abstraction allows for easier maintenance and modification of code
Encapsulation helps in achieving data hiding an...read more
Q8. Find k largest element in an array
Use sorting or heap data structure to find k largest elements in an array of strings.
Sort the array in descending order and return the first k elements.
Use a max heap data structure to efficiently find the k largest elements.
Examples: ['apple', 'banana', 'orange', 'kiwi'], k=2 -> ['orange', 'kiwi']
Q9. What are OOPs concepts?
OOPs concepts refer to Object-Oriented Programming principles such as inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability to present the same interface for different data types.
Abstraction: Hiding the complex implementation details and showing only the necessary features.
Q10. Remove duplicates from array
Remove duplicates from array of strings
Create a Set to store unique strings
Iterate through the array and add each string to the Set
Convert the Set back to an array to get the unique strings
Q11. internal working of hashmap?
HashMap is a data structure that stores key-value pairs and uses hashing to quickly retrieve values based on keys.
HashMap internally uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.
If multiple keys hash to the same index, a linked list is used to handle collisions.
To retrieve a value, the key is hashed again to find the index and then the linked list is searche...read more
Q12. Find the Next Palindrome
A program to find the next palindrome number after a given number.
Convert the given number to a string to easily manipulate individual digits.
Increment the number by 1 and check if it is a palindrome.
If not a palindrome, repeat the process until a palindrome is found.
Q13. Anagrams in a string
The question is about finding anagrams in a given string.
An anagram is a word or phrase formed by rearranging the letters of another word or phrase.
To find anagrams in a string, we can use a hashmap to store the frequency of characters in each word.
We can iterate through the string and for each substring of length equal to the length of the target word, check if it is an anagram.
If the frequency of characters in the substring matches the frequency of characters in the target ...read more
Interview Process at NYK Logistics (UK)
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month