Quikr
60+ TRATICO Engineering Interview Questions and Answers
You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘N’ days. You can either buy or sell a stock. Also, you can only complete at most 2-transactions. Find ...read more
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.
Note:
Each pair shou...read more
You are given a Singly Linked List of integers. You have to find if the given linked list is palindrome or not.
A List is a palindrome if it reads the same from the left to the...read more
You are given a string 'STR' containing lowercase English letters from a to z inclusive. Your task is to find all non-empty possible subsequences of 'STR'.
A Subsequence of a string is the...read more
You had a sequence of consecutive nonnegative integers. You appended all integers at the end of each other to form a string ‘S’ without any separators. While appending each integer ...read more
Ninja is now bored with numbers and is now playing with characters but hates when he gets repeated characters. Ninja is provided a string, and he wants to return the first unique ch...read more
Consider all numbers from 1 to ‘N’, your task is to find the sum of gcd of all pairs (i, j) such that 1 <= i < j <= N.
For example for N = 3, all pairs are { (1, 2), (1, 3), (2, 3) }.
Note :
Gcd of two n...read more
You are given a number 'N' in the form of a string 'S', your task is to find the smallest number strictly greater than the given number 'N' which is a palindrome...read more
If there is a website run by 2 servers. These 2 servers balances the load using Load Balancer. So, if 1 session is created on 1 server and say load is shift to another server immediately, then...read more
You are given an array arr of N non-negative integers, you need to return true if the array elements consist of consecutive numbers otherwise return false.
For Example: If the given array is...read more
Q11. If there is a website run by 2 servers. These 2 servers balances the load using Load Balancer. So, if 1 session is created on 1 server and say load is shift to another server immediately, then how session is ma...
read moreSession is maintained using session affinity or sticky sessions.
Session affinity ensures that a user's session is always directed to the same server.
Load balancer uses a unique identifier to route requests to the same server.
Sticky sessions can be implemented using cookies or URL rewriting.
Session replication can also be used to maintain session data across multiple servers.
Given a wood of some size. It burns from 1 end to another and takes 30 min. How to burn the same wood in 15 min.?
How to get Domain name from URL using Jquery?
You are given an array/list ‘ARR’ consisting of ‘N’ distinct integers arranged in ascending order. You are also given an integer ‘TARGET’. Your task is to count all the distinct pairs in ‘ARR’ such that...read more
How to increase php memory at run time, if it exhausts?
How can we create a thread in java?
What is Connection Pooling?
Q18. If there is a website run by 2 servers. These 2 servers balances the load using Load Balancer.So, if 1 session is created on 1 server and say load is shift to another server immediately, then how session is mai...
read moreSession is maintained through session affinity or sticky sessions.
Session affinity ensures that a user's session is always directed to the same server.
Sticky sessions use cookies to track the user's session and direct them to the same server.
Load balancers can also use IP-based affinity to maintain sessions.
Session persistence can be configured based on time or number of requests.
Without session affinity, users may experience issues with lost data or inconsistent behavior.
What are closures in Javascript?
What is critical section problem?
Q21. Find the first non repetitive character in a string?
Find the first non-repeating character in a string.
Create a hash table to store the frequency of each character in the string.
Iterate through the string and check the frequency of each character.
Return the first character with a frequency of 1.
Q22. How to write a Connection class to MySQL database using PHP?
To connect to MySQL database using PHP, create a Connection class.
Use mysqli_connect() function to establish a connection
Pass the database credentials as parameters to the function
Create a constructor method to initialize the connection
Create a query method to execute SQL queries
Close the connection using mysqli_close() method
Q23. How to increase php memory at run time, if it exhausts?
To increase PHP memory at run time, modify the php.ini file or use ini_set() function.
Edit the memory_limit value in php.ini file
Use ini_set('memory_limit', '256M') function to increase memory limit at run time
Check for memory leaks in the code
Use unset() function to free up memory after use
How session works in PHP?
Q25. Abstract class? How it is different from interface? Is multiple inheritance possible in php? How?
Explaining abstract class, interface and multiple inheritance in PHP.
Abstract class is a class that cannot be instantiated and can have abstract methods.
Interface is a collection of abstract methods and constants that can be implemented by a class.
Multiple inheritance is not possible in PHP, but can be achieved using interfaces.
Interfaces can be implemented by multiple classes, allowing for multiple inheritance-like behavior.
Q26. Given a no K and an array. Find pair of elements whose sum is equal to given no K
Find pair of elements in an array whose sum is equal to a given number K.
Iterate through the array and for each element, check if K minus the element exists in the array.
Use a hash table to store the elements and their indices for faster lookup.
If multiple pairs exist, return any one of them.
If no pair exists, return null or an appropriate message.
Create a singleton design pattern in PHP 5
Write code to connect PHP to MySQL.
Write a stored procedure to join 2 tables.
Q31. Find missing element in an array of elements from 0 to n-1?
Find missing element in an array of elements from 0 to n-1
Calculate sum of all elements in array and subtract from sum of n natural numbers
Use XOR operation on all elements and n natural numbers
Sort the array and find the missing element
Q32. WAP to check if linked list elements is a palindrome without using any extra space?
WAP to check if linked list elements is a palindrome without using any extra space.
Traverse the linked list and reverse the second half of the list
Compare the first half with the reversed second half
Use two pointers to traverse the list, one at normal speed and other at double speed
Q33. WAP to get smallest plindron number larger than the given no?
WAP to find smallest palindrome number larger than given number.
Convert the given number to string and check if it is already a palindrome.
If not, increment the number and check if it is a palindrome.
Repeat until a palindrome number larger than the given number is found.
Use a while loop to implement the above steps.
Different types of error in PHP
Singleton Design pattern Implementation
Q36. Write a stored procedure from a given set of tables and conditions. Simple one
Write a stored procedure from given tables and conditions
Identify the tables and their relationships
Determine the conditions to be used in the stored procedure
Write the SQL code for the stored procedure
Test the stored procedure to ensure it returns the desired results
Q37. 1. Given a wood of some size. It burns from 1 end to another and takes 30 min. How to burn the same wood in 15 min.?
To burn a wood of some size in 15 min instead of 30 min, split it into two halves and burn them simultaneously.
Split the wood into two halves
Burn both halves simultaneously
Use a larger flame or accelerant to increase the burning rate
Q38. What are the different types of error in php?
There are three types of errors in PHP: syntax errors, runtime errors, and logical errors.
Syntax errors occur when the code is not written correctly, such as missing semicolons or parentheses.
Runtime errors occur during the execution of the code, such as trying to access an undefined variable.
Logical errors occur when the code runs without errors, but produces unexpected results, such as a miscalculation in a formula.
Difference between abstract class and interface
Q40. WAP to implement some basic Design Patterns like Singleton?
Singleton pattern ensures only one instance of a class is created and provides a global point of access to it.
Create a private constructor to prevent direct instantiation of the class
Create a private static instance of the class
Create a public static method to access the instance
Ensure thread safety by using synchronized keyword or static initialization block
Examples: Logger, Configuration Manager, Database Connection Manager
Q41. How to implement Critical section in Java and on which variable?
To implement critical section in Java, use synchronized keyword on the shared variable.
Use synchronized keyword to ensure only one thread can access the shared variable at a time.
The shared variable should be the object on which the synchronized keyword is applied.
Example: synchronized(sharedObject) { //critical section code }
Q42. What all we can do with php.ini?
php.ini is a configuration file for PHP that allows users to customize various settings.
Change PHP settings such as memory limit, file upload size, and error reporting
Enable or disable extensions and modules
Set timezone and language settings
Configure email settings
Control caching and session settings
Q43. If a marketing campaign is not working as expected , what was the issue ? what steps did u take to understand the issue ?
The issue could be due to various factors such as targeting, messaging, or timing. Steps taken include analyzing data, conducting A/B testing, and adjusting strategies accordingly.
Identify the specific goals and KPIs of the campaign to determine where it may be falling short
Analyze data such as click-through rates, conversion rates, and engagement metrics to pinpoint areas of underperformance
Conduct A/B testing to test different variables such as ad copy, visuals, or targetin...read more
Q44. Find missing element in an array of elements from 0 to n-1. Different approaches asked(about 3 to 4 approaches)?
Find missing element in an array of elements from 0 to n-1 using different approaches.
Approach 1: Sum of n natural numbers - sum of array elements
Approach 2: XOR all array elements and XOR with n natural numbers
Approach 3: Binary search for missing element
Approach 4: Using a hash table to store array elements
Q45. Jquery function to get domain from a url?
Use window.location to get domain from a url in jQuery.
Use window.location to get the full url
Use .hostname to get the domain name
Use .replace() to remove 'www.' if present
Q46. how to do targeting , what approach would you take to target a specific audience ?
Targeting specific audience involves identifying key demographics, interests, and behaviors to tailor marketing strategies.
Conduct market research to understand the target audience's demographics, interests, and behaviors.
Utilize data analytics tools to track and analyze customer behavior and preferences.
Create buyer personas to represent different segments of the target audience.
Use social media targeting options to reach specific demographics based on age, location, interes...read more
Q47. A/B test how is it done , what is the use of this test ?
A/B testing is a method used to compare two versions of a webpage or app to determine which one performs better.
A/B testing involves creating two versions (A and B) of a webpage or app with one differing element, such as a headline or call-to-action button.
Users are randomly shown either version A or B, and their interactions are measured to determine which version performs better in terms of conversions or other metrics.
The version that performs better is then implemented as...read more
Q48. What is connection pooling
Connection pooling is a technique of reusing database connections to improve performance.
Connection pooling helps to reduce the overhead of creating and destroying database connections.
It maintains a pool of connections that can be reused by multiple clients.
Connection pooling is commonly used in web applications to handle multiple requests simultaneously.
It can be configured with parameters like maximum number of connections, timeout, etc.
Examples of connection pooling libra...read more
Q49. HOW TO CONVERT FROM VIDEO TO AUDIO
To convert from video to audio, you can use various software and online tools.
Use software like VLC Media Player, Handbrake, or FFmpeg to convert video to audio.
Online tools like Online-Convert.com and CloudConvert.com can also be used for conversion.
Choose the desired audio format and quality before converting.
Ensure that the video file is compatible with the software or tool being used for conversion.
You have to design a basic HTML form with Name, Password and Email entities and validate the form using JavaScript.
Q51. Write a singleton class in php?
A singleton class in PHP is a class that can only be instantiated once.
Create a private constructor to prevent direct instantiation
Create a private static variable to hold the instance of the class
Create a public static method to get the instance of the class
Ensure that the public static method always returns the same instance
Q52. How session works in php?
Session in PHP allows to store user data on the server for later use.
Session starts when a user logs in and ends when the user logs out or the session expires.
Session data is stored on the server and identified by a unique session ID.
Session variables can be set and accessed using the $_SESSION superglobal array.
Session can be destroyed using the session_destroy() function.
Session can be used to store user-specific data such as login credentials, shopping cart items, etc.
Q53. WHAT IS THE IMAGE FILE HEIGHT
The image file height refers to the vertical size of the image in pixels.
Image file height is measured in pixels.
It determines the vertical size of the image.
The height can be found in the image file's metadata or by opening the image in an image editor and checking its properties.
Q54. what is your experience with google tag manager ?
I have extensive experience with Google Tag Manager, including setting up tracking codes, triggers, and variables.
Implemented various tracking codes for website analytics and conversion tracking
Created custom triggers and variables to track specific user interactions
Utilized Google Tag Manager to streamline the process of adding and updating tags on websites
Q55. WHAT IS THE CODEC LAST NAME
The question is unclear and does not make sense in the context of a Wordpress Developer interview.
The question is likely a mistake or a joke.
There is no codec with the last name.
Codec is a term used in digital media to refer to a method of encoding and decoding data.
As a Wordpress Developer, knowledge of codecs may be useful for working with multimedia content on websites.
Q56. HOW TO CONVERT FROM OGG FROM MP3
OGG to MP3 conversion can be done using various online converters or software.
Use online converters like CloudConvert, Convertio, etc.
Use software like VLC media player, Audacity, etc.
Install FFmpeg and use command line to convert.
Check for copyright issues before converting.
Ensure quality of converted file is satisfactory.
Q57. Workflow of the integration and other application involved on integration
The integration workflow involves connecting different applications to enable seamless data exchange.
Identify the systems that need to be integrated
Define the data flow between the systems
Develop APIs or connectors for data exchange
Test the integration to ensure data accuracy and consistency
Monitor and maintain the integration for ongoing performance
Examples: Integrating CRM system with marketing automation platform, connecting e-commerce website with inventory management sys...read more
Q58. HOW TO CONVERT WAV TO MP3
Use a media converter software or an online converter tool to convert WAV to MP3.
Download and install a media converter software like Audacity or Freemake Audio Converter.
Open the software and import the WAV file.
Choose MP3 as the output format and select the desired quality.
Click on the convert button and wait for the process to complete.
Alternatively, use an online converter tool like Online-Convert or Zamzar.
Upload the WAV file and select MP3 as the output format.
Click on ...read more
Q59. Who is the ceo of Axis bank
Amitabh Chaudhry is the CEO of Axis Bank.
Amitabh Chaudhry became the CEO of Axis Bank in January 2019.
He was previously the MD and CEO of HDFC Life Insurance Company.
Under his leadership, Axis Bank has focused on digital transformation and customer-centric initiatives.
Q60. WHAT THE CROPPED IMAGE
A cropped image is an image that has been trimmed or cut to a specific size or shape.
Cropping an image removes unwanted parts of the image
Cropped images are often used for thumbnails or profile pictures
Cropping can be done manually or with software like Photoshop
Aspect ratio should be considered when cropping to avoid distortion
Q61. What is GST full from
GST stands for Goods and Services Tax.
GST stands for Goods and Services Tax
It is an indirect tax levied on the supply of goods and services in India
Implemented on 1st July 2017 to replace multiple indirect taxes like VAT, service tax, etc.
Q62. Write a java code to generate fibonacci series
Java code to generate fibonacci series
Use a loop to generate the series
Start with the first two numbers 0 and 1
Add the previous two numbers to get the next number
Q63. center div using 3 approaches
Three approaches to center a div element
Using CSS flexbox: set display property of parent element to flex and justify-content to center
Using CSS grid: set display property of parent element to grid and place the div in the center grid area
Using margin: set margin property of the div to auto
Q64. display use of setTimeout
setTimeout is a function in JavaScript used to execute a function after a specified amount of time.
setTimeout(function, milliseconds) is used to delay the execution of a function by a specified number of milliseconds.
Example: setTimeout(() => { console.log('Hello, world!'); }, 2000) will log 'Hello, world!' after 2 seconds.
More about working at Quikr
Top HR Questions asked in TRATICO Engineering
Interview Process at TRATICO Engineering
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month