Coding Interview PatternsHere's a list of 30 coding interview patterns, each with one or two example LeetCode problems:1. Sliding WindowProblem 1: Minimum Size Subarray Sum Problem 2: Longest Substring Without Repeating Characters2. Two Pointers...
Q: You are given a bit array (i.e each element is 0 or 1) A[1..n]. A bit array is called balanced if the number of times 01 appears is same as the number of times 10 appears. By 01 appearing we mean that A[i] = 0 and A[i+1] = 1 for some i. i.e. S1 = { i ...
Python programming practices on InterviewBit. Contribute to woodyko3234/InterviewBit-Practices development by creating an account on GitHub.
Interview Candidate Mar 6th, 2005 4 7638 yba Jul 9th, 2007 The comment is incorrect, the original answer is correct. In C, passing an array as a parameter does not pass any information about how many elements are in the array. sizeof() can tell you the size of the pointer, the size...
Languages Interview Questions Cisco (35) Micro Processor Interview Questions Cognizant (1) Placement Assistance Dell (22) Aptitude Interview Questions GE (2) Placement Assistance HAL (1) Placement Assistance Infosys (212) Challenging Puzzles ISRO (6) Placement Assistance Mphasis (1) Placement Assistance...
/** * Reverses the string in-place * Time Complexity: O(n) * Space Complexity: O(1) * * * What I learned: * * 1) use two pointers (left & right) for in-place reverse * - use condition (left < right) * - don't forget to left++ & right-- * * 2) check empty case ...