Govt Exams
git reset --hard HEAD~1 is the standard command to undo the last commit and discard changes. HEAD~1 refers to the previous commit.
Heap Sort is an in-place sorting algorithm requiring only O(1) extra space, making it optimal for memory-constrained environments despite having O(n log n) time complexity.
Microservices architecture allows individual components to scale independently, improves fault isolation, enables easier updates, and promotes team autonomy in development.
A base case (or termination condition) is essential in recursion to stop the function from calling itself indefinitely, preventing stack overflow errors.
For searching in large datasets, Binary Search Trees provide O(log n) complexity and Hash Tables provide O(1) average case, both significantly better than linear search in unsorted structures.
The technical round evaluates candidates' programming proficiency, understanding of data structures, algorithms, and their ability to solve complex problems under time constraints.
TCS (Tata Consultancy Services) is a global IT services and consulting company with diverse business segments including IT services, consulting, and enterprise solutions.
With 5 vertices, maximum edges = 10. With 7 edges, it's sparse (closer to tree structure than dense).
TCS employs over 600,000 people globally, making it one of the largest IT service providers.
Sorted: [1,1,2,3,4,5,6,9]. Median of 8 elements = (3+4)/2 = 3.5