Find Interview Questions for Top Companies
Damco Solutions Interview Questions and Answers
Ques:- Given an array (possibly with duplicates) and two numbers, return the minimum distance (number of indices apart) between the two numbers in the array, using minimal time complexity.
Asked In :- Damco Solutions,
Right Answer:

Input: arr = [3, 5, 2, 3, 5, 3, 2], num1 = 3, num2 = 2
Output: 1
(Closest 3 and 2 are at indices 3 and 4 or 5 and 6)

✅ Efficient Solution (O(n) time, O(1) space):

You only need a single pass through the array.

🧠 Idea:

  • Track last seen positions of num1 and num2

  • Update minimum distance when both have been seen

✅ Python Code:

def min_distance(arr, num1, num2):
min_dist = float(‘inf’)
last_pos1 = last_pos2 = -1

Ques:- What is the main difference between appilication server and webserver?what extra services offered by application server than web server?
Right Answer:
The main difference between an application server and a web server is that a web server primarily handles HTTP requests and serves static content (like HTML, CSS, and images), while an application server provides additional services such as business logic processing, database connectivity, and support for dynamic content generation. Application servers also often include features like transaction management, messaging, and security services that are not typically offered by web servers.
Ques:- You need to create two new directories in your home directory. The first one is called /home/bob/letters and the second one is /home/bob/letters/sales. Which of the following command lines should you use?Choose one:a. mkdir /home/bob/letters/salesb. mkdir letters; mkdir salesc. mkdir letters/salesd. mkdir home/bob/letters/sales
Ques:- How do I combine multiple sheets into one?
Right Answer:
To combine multiple sheets into one in CSS, you can use the `@import` rule to import styles from different CSS files into a single main stylesheet. Alternatively, you can manually copy and paste the CSS rules from each sheet into one file.
Ques:- How would you deal with an angry client/customer?
Right Answer:
I would listen to the client's concerns, empathize with their feelings, apologize for any inconvenience, and work collaboratively to find a solution that meets their needs.
Ques:- Give me an example of a situation when you went the extra mile for a customer?
Right Answer:
In a previous project, a client needed a last-minute design change for a presentation. I worked late into the night to revise the layout and ensure it was visually appealing and aligned with their brand. The client was thrilled with the result and expressed gratitude for my dedication.
Ques:- What is a Smart Object?
Right Answer:
A Smart Object in Photoshop is a layer that contains image data from raster or vector images, allowing you to perform non-destructive editing, such as scaling, transforming, and applying filters without losing the original image quality.
Ques:- How does a web server handle an HTTP request
Right Answer:
A web server handles an HTTP request by following these steps:

1. **Receive Request**: The server listens for incoming HTTP requests on a specific port (usually port 80 for HTTP or port 443 for HTTPS).
2. **Parse Request**: It parses the request to extract the method (GET, POST, etc.), URL, headers, and body.
3. **Process Request**: The server determines how to respond based on the request. This may involve retrieving files, querying a database, or executing server-side scripts.
4. **Generate Response**: It creates an HTTP response, which includes a status code (like 200 for success), headers, and the requested content (like HTML, JSON, etc.).
5. **Send Response**: The server sends the response back to the client (usually a web browser) over the network.
6. **Log Request**: Optionally, the server logs the request details for monitoring and analysis.
Ques:- What is JavaScript and how is it used in web development
Right Answer:
JavaScript is a programming language used to create interactive and dynamic content on websites. It allows developers to manipulate HTML and CSS, handle events, and communicate with servers, enhancing user experience and functionality in web development.
Ques:- What is the box model in CSS
Right Answer:
The box model in CSS describes the rectangular boxes generated for elements in a document tree and consists of four areas: content, padding, border, and margin. The content is the innermost area, surrounded by padding, then the border, and finally the margin, which is the outermost area.
Ques:- What are event bubbling and event delegation in JavaScript
Right Answer:
Event bubbling is a JavaScript event propagation method where an event starts from the target element and bubbles up to its ancestors in the DOM hierarchy. Event delegation is a technique that involves attaching a single event listener to a parent element to manage events for multiple child elements, leveraging event bubbling to handle events efficiently.
Ques:- What is responsive design and how do you implement it
Right Answer:
Responsive design is an approach to web development that ensures a website looks and functions well on various devices and screen sizes. It is implemented using flexible grid layouts, fluid images, and CSS media queries to adapt the layout and content based on the device's screen size and orientation.
AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users