Moveinsync Technology Solutions
Shikhar group Interview Questions and Answers
Q1. Sort the array which consists of 0's, 1's , 2's. (Two Pointer approach)
Sort an array of 0's, 1's, and 2's using two pointer approach.
Initialize two pointers, one at the beginning and one at the end of the array.
Traverse the array and swap 0's to the beginning and 2's to the end using the pointers.
Stop when the pointers meet or cross each other.
Q2. Search in the rotated Sorted array. (Binary Search - pivot)
Search for an element in a rotated sorted array using binary search with pivot.
Find the pivot element using binary search.
Compare the target element with the first element of the array to determine which half to search.
Perform binary search on the selected half of the array.
Repeat until the target element is found or the array is exhausted.
Q3. Tell me about id selector in CSS
ID selector is used to select an element with a specific ID attribute in CSS.
ID selector is denoted by '#' followed by the ID name.
ID should be unique on a page.
ID selector has higher specificity than class selector.
Example: #header { color: blue; }
Q4. DSA : Search an element in infinite soted array
Search an element in an infinite sorted array using binary search.
Initialize low as 0 and high as 1.
Double the high index until arr[high] is greater than the target element.
Perform binary search between low and high indexes.
Q5. Differences between ShallowCopy & DeepCopy
ShallowCopy copies only the reference of an object while DeepCopy creates a new object with a new reference.
ShallowCopy creates a new reference to the same object, so changes made to the copy will reflect in the original object.
DeepCopy creates a new object with a new reference, so changes made to the copy will not reflect in the original object.
ShallowCopy is faster and less memory-intensive than DeepCopy.
DeepCopy is necessary when you need to modify the copied object withou...read more
Q6. Differences between struct and class
Struct is a value type while class is a reference type in C#.
Structs are stored on the stack while classes are stored on the heap.
Structs cannot be inherited while classes can be inherited.
Structs do not support destructors while classes do.
Structs are used for small data structures while classes are used for larger, more complex objects.
Example of struct: struct Point { public int X; public int Y; }
Example of class: class Person { public string Name; public int Age; }
Q7. Define Copy Constructor
Copy constructor is a special constructor that creates a new object by copying an existing object.
It is used to create a new object with the same values as an existing object.
It takes an object of the same class as a parameter.
It is automatically called when a new object is created from an existing object.
It creates a deep copy of the object, meaning that all the member variables are copied.
Example: class MyClass { public: MyClass(const MyClass& obj) { // copy constructor cod...read more
Q8. Define Operator overloading
Operator overloading allows operators to have different meanings based on the context of their usage.
Operator overloading is a feature in object-oriented programming languages.
It allows operators to be redefined for custom classes.
For example, the '+' operator can be overloaded to concatenate strings or add numbers.
It can improve code readability and reduce the amount of code needed for certain operations.
Q9. What is Bad debt?
Bad debt refers to money owed by a debtor that is unlikely to be paid back, resulting in a loss for the creditor.
Bad debt is typically the result of customers defaulting on their payments.
It is recorded as an expense on the creditor's financial statements.
Companies may write off bad debts to remove them from accounts receivable.
Examples include unpaid invoices, loans that are not repaid, and credit card debt that goes into default.
Top HR Questions asked in Shikhar group
Interview Process at Shikhar group
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month