i
PTC
Filter interviews by
I applied via Campus Placement and was interviewed in May 2022. There were 2 interview rounds.
Top trending discussions
C++ program to reverse a string
Use a loop to iterate through the string
Swap the characters at the beginning and end of the string
Continue swapping until the middle of the string is reached
I appeared for an interview before Sep 2020.
Round duration - 90 minutes
Round difficulty - Medium
Timing: 90 mins
Environment: Online coding round
No of questions: 3 Questions(225 marks) were asked.
You are provided with an array of integers. The task is to sort the array in ascending order using the quick sort algorithm.
Quick sort is a divide-and-conquer algorithm. It ...
Yes, the quick sort algorithm can be enhanced to achieve NlogN complexity in the worst case by using randomized quick sort or median of three pivot selection.
Use randomized quick sort to randomly select the pivot element, reducing the chances of worst-case scenarios.
Implement median of three pivot selection to choose a pivot that is closer to the median value, improving partitioning efficiency.
Consider using dual pivot...
You are given an encrypted string where repeated substrings are represented by the substring followed by its count. Your task is to find the K'th character of the d...
Given an encrypted string with repeated substrings represented by counts, find the K'th character of the decrypted string.
Parse the encrypted string to extract substrings and their counts
Iterate through the substrings and counts to build the decrypted string
Track the position in the decrypted string to find the K'th character
You have 'N' jobs, each with a start time, end time, and profit. Your task is to identify the maximum profit that can be earned by scheduling these jobs such that...
The Weighted Job Scheduling problem involves maximizing profit by scheduling non-overlapping jobs with given start times, end times, and profits.
Sort the jobs by end time in ascending order.
Initialize an array 'dp' to store maximum profit at each job index.
For each job, find the latest non-overlapping job and update 'dp' with the maximum profit.
Return the maximum profit from 'dp'.
Round duration - 45 minutes
Round difficulty - Medium
Timing: evening
Environment: Virtual(remote)
Activity:
It was a resume screening + DSA round . There were 2 interviewers in this round. Initially , a brief introduction was given by them & later , they started with projects listed in my resume . They first asked me to explain about the projects , asked some questions related to its implementation & its actual use case in real world (where it can be used) .Later , they switched to DSA part , a total of 2 questions of easy medium difficulty level were asked . I only remember 1 question that was similar to Minimum platform problem.
After this , They asked me for favourite subjects. I said Operation Systems . Then , they asked for some concepts in OS , including CPU scheduling & its algos like Round robin , SJF etc and later asked which type of scheduling algorithm is used to design actual systems .
Your task is to determine the minimum number of platforms required at a railway station so that no train has to wait.
Given two arrays:
AT
- represent...Determine the minimum number of platforms needed at a railway station so that no train has to wait.
Sort the arrival and departure times arrays in ascending order.
Use two pointers to iterate through the arrays and keep track of the number of platforms needed.
Increment the number of platforms needed when a train arrives and decrement it when a train departs.
Return the maximum number of platforms needed at any point.
Examp...
Round duration - 50 minutes
Round difficulty - Medium
It was System design round.Though , it also started with a brief introduction & later , asked about projects . As my project was related to test classification . In that context , they asked me to design a low level Suggestion system(In any preferred language) .
You are provided with a list of strings, DICTIONARY[]
, representing the correct spellings of words, and a query string QUERY
that may contain misspelled words. Your task is...
Given a list of correct spellings and a query string, return a list of suggested correct spellings if the query is misspelled.
Iterate through the dictionary to check for matching prefixes with the query string.
If a match is found, add the corresponding word to the list of suggestions.
Return the list of suggestions if the query is misspelled, otherwise return an empty list.
Tip 1 : Practice a lot of problems from leetcode/coding ninjas or some other platform.
Tip 2 : Participate in daily contests on codeforces, leetcode, kickstart, etc.
Tip 3 : Include new topics while learning/solving Data structures problems like tries, BIT, etc.
Tip 1 : Mention your competitve programming skills and profiles in resume if possible.
Tip 2 : While mentioning things in resume: mention by numbers.
Tip 3 : Make a neet resume in some standard format(maybe by using LaTeX)
Tip 4 : Have atleast 2 projects(on which you are confident) in resume
Tip 5 : Don't put false positive on resume.
I appeared for an interview before Sep 2020.
Round duration - 75 minutes
Round difficulty - Hard
Coding Test with 3 problems. 1 Easy , 1 Medium , 1 Very Hard
You are provided with a list of jobs, where each job has a specific deadline and profit. The goal is to schedule these jobs such that the total profit is maximized. Each job require...
The goal is to schedule jobs to maximize profit while meeting deadlines. Each job takes one unit of time and only one job can be scheduled at a time.
Sort the jobs in decreasing order of profit
Iterate through the sorted jobs and schedule them based on their deadlines
Keep track of the total profit achieved
Ensure each job is completed before its deadline
Given a binary tree with N
nodes, your task is to output the Spiral Order traversal of the binary tree.
The input consists of a single line containing elem...
Implement a function to return the spiral order traversal of a binary tree.
Traverse the binary tree level by level, alternating between left to right and right to left.
Use a queue to keep track of nodes at each level.
Append nodes to the result list in the order they are visited.
Goku has ‘N’ Dragon Balls, where each Dragon Ball is unique. The ith Dragon Ball has ‘i’ stars on it, meaning the first Dragon Ball has 1 star, the second ...
Count the number of structurally unique binary trees that can be constructed with given Dragon Balls.
Use dynamic programming to solve this problem efficiently.
The number of structurally unique binary trees can be calculated using Catalan numbers.
For each test case, calculate the number of structurally unique binary trees modulo 10^9 + 7.
Return the count of unique binary trees for each test case.
Round duration - 60 minutes
Round difficulty - Hard
In depth questions on Subjects like OOP , DBMS , OS , Javascript.
Round duration - 40 minutes
Round difficulty - Hard
Questions on my resume, projects, internship done. Interviewer was a bit harsh on me.
Low-level languages interact directly with hardware, while high-level languages are more abstract and easier to read/write.
Low-level languages are closer to machine code and hardware, while high-level languages are closer to human language.
Low-level languages require more manual memory management and are less portable, while high-level languages have automatic memory management and are more portable.
Examples of low-lev...
Tip 1 : Never leave any topic from any chapter / Subject
Tip 2 : Learn to explain your thoughts well
Tip 3 : Learn from previous experiences / interviews / problems asked.
Tip 4 : Atleast 4 projects in Resume
Tip 1 : Atleast 4 projects on Resume
Tip 2 : Do not write false things. You always get caught. Be genuine.
I applied via Referral and was interviewed before Apr 2020. There were 3 interview rounds.
I applied via LinkedIn and was interviewed in Mar 2021. There were 3 interview rounds.
I appeared for an interview before Mar 2021.
Round duration - 60 minutes
Round difficulty - Easy
This was a technical round with questions on DBMS.
Data integrity refers to the accuracy, consistency, and reliability of data throughout its lifecycle.
Data integrity ensures that data is accurate and consistent in storage and transmission.
It involves maintaining the quality and reliability of data over time.
Methods for ensuring data integrity include checksums, encryption, and error detection codes.
Examples of data integrity violations include data corruption, unautho
A trigger is a special type of stored procedure that automatically executes when certain events occur in a database.
Triggers are used to enforce business rules, maintain data integrity, and automate repetitive tasks.
They can be triggered by INSERT, UPDATE, or DELETE operations on a table.
Examples of triggers include auditing changes to a table, updating related tables when a record is modified, or enforcing referential
Clustered indexes physically order the data in the table, while non-clustered indexes do not.
Clustered indexes determine the physical order of data in the table, while non-clustered indexes do not.
A table can have only one clustered index, but multiple non-clustered indexes.
Clustered indexes are faster for retrieval of data, especially range queries, compared to non-clustered indexes.
Non-clustered indexes are stored se...
Round duration - 60 minutes
Round difficulty - Easy
Technical interview round with questions on DBMS.
UNION combines and removes duplicates, UNION ALL combines without removing duplicates.
UNION merges the result sets of two or more SELECT statements and removes duplicates.
UNION ALL merges the result sets of two or more SELECT statements without removing duplicates.
UNION is slower than UNION ALL as it involves removing duplicates.
Example: SELECT column1 FROM table1 UNION SELECT column1 FROM table2;
Example: SELECT column...
A cursor in PL/SQL is used to retrieve and process multiple rows of data one at a time.
Allows iteration over a result set
Retrieves data row by row
Can be used to update or delete rows in a table
Must be declared, opened, fetched, and closed
SQL query to fetch the nth highest salary from a table
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT clause to fetch the nth highest salary
Round duration - 30 minutes
Round difficulty - Easy
This was a managerial round with typical behavioral problems.
Tip 1 : Since this was a SQL post, I would suggest you to get the basics intact and try practicing few queries.
Tip 2 : Must do Previously asked Interview as well as Online Test Questions.
Tip 3 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I applied via Naukri.com and was interviewed before Jul 2020. There were 4 interview rounds.
Insertion sort and quicksort are sorting algorithms used to sort arrays of data.
Insertion sort: iterates through the array and inserts each element into its proper position.
Quicksort: selects a pivot element and partitions the array into two sub-arrays, one with elements less than the pivot and one with elements greater than the pivot.
Insertion sort is best for small arrays, while quicksort is best for large arrays.
Bot...
Merge two sorted linked lists using recursion
Create a recursive function that compares the first nodes of both lists
Set the smaller node as the head of the merged list and call the function again with the next node of the smaller list
Base case: if one list is empty, return the other list
Return the merged list
Given an integer, determine which byte is zero.
Convert the integer to a byte array using bitwise operations.
Iterate through the byte array and check for a zero value.
Return the index of the zero byte.
Consider endianness when converting to byte array.
To check endianness, create a 4-byte integer with a known value and check the byte order.
Create a 4-byte integer with a known value
Check the value of the first byte to determine endianness
If the first byte is the least significant, the machine is little endian
If the first byte is the most significant, the machine is big endian
Static objects can be used to print something before main() execution.
Static objects are initialized before main() execution
They can be used to print something before main()
Example: static int x = printf("Hello World!");
Output: Hello World! will be printed before main() execution
Static variables are allocated memory in the data segment of the program's memory space.
Static variables have a fixed memory location throughout the program's execution.
They are initialized to zero by default.
If initialized explicitly, they are stored in the data segment.
Static variables can be accessed by any function in the program.
Finding space and time complexity of a recursive function.
Space complexity is the amount of memory used by the function.
Time complexity is the amount of time taken by the function to execute.
Recursive functions have higher space complexity due to the call stack.
Time complexity can be calculated using Big O notation.
Examples of recursive functions include factorial and Fibonacci sequence.
Diamond hierarchy problem is a problem in object-oriented programming where a class inherits from multiple classes in a diamond-shaped hierarchy.
Occurs when a class inherits from two classes that share a common base class
Can lead to ambiguity in method calls and data members
Solved using virtual inheritance or by using interfaces
based on 6 reviews
Rating in categories
Software Specialist
169
salaries
| ₹6.5 L/yr - ₹17 L/yr |
Technical Lead
108
salaries
| ₹10.1 L/yr - ₹29 L/yr |
Senior Software Specialist
95
salaries
| ₹9.1 L/yr - ₹24.5 L/yr |
QA Specialist
83
salaries
| ₹7 L/yr - ₹15 L/yr |
Product Specialist
77
salaries
| ₹7.5 L/yr - ₹13 L/yr |
Autodesk
24/7 Customer
Thomson Reuters
Oracle Cerner