Filter interviews by
I was interviewed in Dec 2022.
Lazy loading is a technique to load components or resources only when needed.
It improves performance by reducing initial load time.
React.lazy() and Suspense can be used for lazy loading components.
Code splitting can be used for lazy loading resources like images and scripts.
Suspense is a React feature that allows components to wait for data before rendering.
Suspense is used to handle asynchronous data fetching in React.
It allows components to render a fallback UI while waiting for data to load.
Suspense is often used with the new React.lazy() function to lazily load components.
It was introduced in React 16.6.
Rate your
company
🤫 100% anonymous
How was your last interview experience?
I applied via Walk-in and was interviewed before Sep 2019. There was 1 interview round.
Program to compute the sum of squares of numbers from 1 to 10.
Use a loop to iterate from 1 to 10
Use pow(a,b) function to calculate the square of each number
Add the squares to a variable to get the sum
Function to reverse and display a string
Create a function that takes a string as input
Use the split() method to convert the string into an array of characters
Use the reverse() method to reverse the order of the characters in the array
Use the join() method to convert the array back into a string
Return the reversed string
Program to implement stack data structure using array of strings
Declare an array of strings and a variable to keep track of top element
Implement push function to add element to top of stack
Implement pop function to remove top element from stack
Implement peek function to return top element without removing it
A program to get user name and age with specific conditions.
Use input() function to get user name and age.
Use isalpha() function to check if name contains only alphabets.
Use len() function to check if name is more than 6 characters.
Use if-else statements to check age range.
Print the name and age if all conditions are met.
COMP1 and COMP2 are two different components with distinct features and functionalities.
COMP1 is designed for X while COMP2 is designed for Y
COMP1 has a higher processing speed than COMP2
COMP2 has a larger storage capacity than COMP1
COMP1 is more expensive than COMP2
COMP2 is more energy-efficient than COMP1
File structure is defined in code and declared in the file system.
File structure is defined in the code of the program that creates or uses the file.
The file structure is declared in the file system when the file is created or saved.
The file structure defines the organization of data within the file, such as headers, tables, or records.
Examples of file structures include CSV, XML, JSON, and binary formats.
The file stru...
Control blocks are used in programming to control the flow of execution. Examples include if-else, for, while, and switch.
if-else block is used to execute a certain block of code if a condition is true, and another block of code if the condition is false
for loop is used to execute a block of code a specific number of times
while loop is used to execute a block of code repeatedly as long as a certain condition is true
swi...
Dynamic call is resolved at runtime while static call is resolved at compile time.
Dynamic call is used for polymorphism and late binding.
Static call is faster and more efficient.
Dynamic call is resolved using virtual tables while static call is resolved using function pointers.
Example of dynamic call: virtual functions in C++.
Example of static call: non-virtual functions in C++.
Control tables are used to manage and control data in a database.
User access control table
Audit trail control table
Configuration control table
Error log control table
FCT stands for Forward Cosine Transform and DCT stands for Discrete Cosine Transform.
Both are mathematical techniques used in signal processing and image compression.
FCT is used in audio signal processing while DCT is used in image and video compression.
DCT is widely used in JPEG image compression.
Both transforms convert a signal from the time domain to the frequency domain.
TDQ and TSQ are both IBM mainframe data structures, but TDQ is used for temporary storage while TSQ is used for message queuing.
TDQ stands for Temporary Data Queue and is used for temporary storage of data.
TSQ stands for Temporary Storage Queue and is used for message queuing.
TDQ is typically used for short-term storage of data that will be processed immediately.
TSQ is typically used for longer-term storage of data tha...
TDQ and TSQ are both IBM mainframe data structures, but their speed depends on the specific use case.
TDQ (Transient Data Queue) is faster for small amounts of data and when the data is being processed by a single program.
TSQ (Temporary Storage Queue) is faster for larger amounts of data and when the data is being shared between multiple programs.
The speed of both TDQ and TSQ can also be affected by factors such as syst...
TDQ and DCT are both data management tools used in different stages of data processing.
TDQ stands for Test Data Quality and is used to ensure the accuracy and completeness of data before it is loaded into a system.
DCT stands for Data Conversion Tool and is used to convert data from one format to another.
TDQ is used in the data validation stage, while DCT is used in the data transformation stage.
Both tools are important...
HTC interview questions for popular designations
Top trending discussions
I had a great stay at IIT Roorkee and spent my time exploring various opportunities and learning new skills.
I was actively involved in various technical clubs and societies on campus
I participated in coding competitions and hackathons
I also took part in organizing technical events and workshops
Apart from academics, I enjoyed playing sports and exploring the scenic campus
Overall, my stay at IIT Roorkee was a fulfilling
Count the number of '-' characters in a string and return 1 if it matches the given number, else return 0.
Use a loop to iterate through each character in the string and count the number of '-' characters.
Compare the count with the given number and return 1 if they match, else return 0.
Handle edge cases such as empty string or negative number input.
Functions to create and delete nodes in a stack
To create a stack, initialize a top pointer to null
To push a node, create a new node and set its next to the current top, then set top to the new node
To pop a node, set top to its next and return the popped node
To delete the stack, pop all nodes until top is null
Code for producer-consumer problem using mutex
Create a shared buffer with a fixed size
Create a mutex to control access to the buffer
Create a semaphore to keep track of the number of items in the buffer
Create a producer thread that adds items to the buffer
Create a consumer thread that removes items from the buffer
Use mutex to lock the buffer while adding or removing items
Use semaphore to signal when the buffer is full o
Mutex and Semaphore are synchronization primitives used in multi-threaded environments.
Mutex is used to provide mutual exclusion to a shared resource, allowing only one thread to access it at a time.
Semaphore is used to control access to a shared resource, allowing multiple threads to access it at a time.
Mutex is binary, meaning it has only two states - locked and unlocked, while Semaphore can have multiple states.
Mute...
Virtual addressing is a memory management technique that allows a process to use a range of memory addresses independent of physical memory.
Virtual addresses are mapped to physical addresses by the memory management unit (MMU)
Virtual addresses are allocated to a process during its execution
Virtual addressing allows for efficient use of physical memory by allowing multiple processes to share the same physical memory
Exam...
Deadlock is a situation where two or more processes are unable to proceed because they are waiting for each other to release resources.
Prevent deadlock by using a proper resource allocation strategy
Avoid holding onto resources for too long
Use timeouts to release resources if they are not being used
Implement a deadlock detection and recovery mechanism
Avoid circular wait by imposing a total ordering of all resource types
Program to find the only duplicate in an array
Create a hash set to store elements as they are encountered
If an element is already in the hash set, it is a duplicate
Return the duplicate element
Virtual memory is still needed even with large physical memory. Paging helps manage memory efficiently.
Virtual memory allows for larger programs to run than physical memory can handle
Paging helps manage memory efficiently by swapping out unused pages to disk
Virtual memory also allows for memory protection and sharing between processes
Examples of programs that require virtual memory include video editing software and la
To find the middle of a linked list, use two pointers - one moving at twice the speed of the other.
Initialize two pointers - slow and fast
Move the slow pointer one step at a time and the fast pointer two steps at a time
When the fast pointer reaches the end of the list, the slow pointer will be at the middle
Time complexity of building a heap using linked list and arrays
Building a heap using linked list takes O(nlogn) time complexity
Building a heap using arrays takes O(n) time complexity
Linked list implementation is slower than array implementation
Yes, static variables can be defined in header files.
Static variables defined in header files have global scope within the file.
They can be accessed by any function within the file.
However, if the header file is included in multiple source files, each file will have its own copy of the static variable.
This can lead to unexpected behavior if the variable is modified in one file and then accessed in another.
It is general...
Yes, constant and volatile can be used together.
Constant variables are read-only and cannot be modified.
Volatile variables are used to indicate that the value may change unexpectedly.
Using both together can be useful in multi-threaded environments.
For example, a constant pointer to a volatile variable can be used to ensure thread safety.
Bi-directional linked list allows traversal in both directions, making it useful for certain algorithms.
Each node in the list has a reference to both the previous and next nodes.
Insertion and deletion operations are more complex than in a singly linked list.
Examples of use include implementing a browser's back and forward buttons or a text editor's undo and redo functionality.
OOPs properties and examples with applications
Encapsulation: bundling of data and methods within a class. Example: Java class. Application: data hiding and security.
Inheritance: creating a new class from an existing class. Example: subclass. Application: code reusability and extensibility.
Polymorphism: ability of an object to take on many forms. Example: method overloading. Application: flexibility and modularity.
Abstr...
Pointers and arrays are related concepts in C programming. Pointers hold memory addresses while arrays hold a collection of values.
Arrays are a collection of values stored in contiguous memory locations.
Pointers hold the memory address of a variable.
Arrays can decay into pointers when passed as arguments to functions.
Pointer arithmetic can be performed on pointers to access memory locations.
Pointers can be used to dyna
It depends on the specific use case and input size.
For small input sizes, simple algorithms like insertion sort or selection sort may be sufficient.
For larger input sizes, more complex algorithms like merge sort or quicksort may be more efficient.
For nearly sorted input, insertion sort may be the fastest.
For input with many duplicates, counting sort or radix sort may be the best choice.
For input with a known range, buc...
Check if a string is palindrome or not
Reverse the string and compare with original
Compare first and last characters and move towards center
Use recursion to check if first and last characters are equal
Some of the top questions asked at the HTC interview -
based on 2 interviews
Interview experience
Anonymously discuss salaries, work culture, and many more
Get Ambitionbox App
Software Engineer
21
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
9
salaries
| ₹0 L/yr - ₹0 L/yr |
Technical Lead
9
salaries
| ₹0 L/yr - ₹0 L/yr |
Devops Engineer
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Team Lead
6
salaries
| ₹0 L/yr - ₹0 L/yr |
Samsung
Apple
OnePlus
Xiaomi