Dec 17, 2021Off-campus Sharechat SDE Intern experienceHow did I apply? Contacted HR at the start of November, if there are any openings for an SDE internship at sharechat. Sent me a test link at the end of November. Online Assessment The test was of 1hr 30mins, it had 3 coding questions, 2 of them were simple implementation and last one involved knowledge…Sharechat2 min readSharechat2 min read

Dec 14, 2021Scaler SDE Internship Interview ExperienceHow did I apply? They opened job applications at the start of November for a 6 months internship for final year students. We had to directly apply from their careers page, no referrals were needed. At the end of November, I got a call for the 1st round of interviews. 1st Technical Round I prepared myself for…Scaler2 min readScaler2 min read

Jun 12, 2021Minimum Cost to Hire K WorkersThere are n workers. The i-th worker has a quality[i] and a minimum wage expectation wage[i]. Every worker in the paid group should be paid in the ratio of their quality compared to other workers in the paid group.” So for any two workers in the paid group, we have…Problem Solving2 min readProblem Solving2 min read

Jun 6, 2021Longest Substring Without Repeating CharactersGiven a string s, find the length of the longest substring without repeating characters. Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length of 3. here we have to find the longest substring which follows some constraints. let’s be a little greedy. we set starting…Sliding Windows2 min readSliding Windows2 min read

Mar 5, 2021Do you know any number you can make with a combination of a power of 2 ?Do you know any number you can easily make with a combination of a power of 2 ? [ 1, 2, 4, 8, 16, 32, 64, 128, 256] for example candidates eligible to make 27 27 = [ 16, 8, 4, 2, 1] why not bigger than 16 obvious power…Patterns2 min readPatterns2 min read

Mar 1, 2021Depth-first search is a way to explore nodes in a tree or graph.Depth-first search is a way to explore nodes in a tree or graph. suppose you are somewhere and want to visit your friend’s home. you are new and don’t have anyone to guide you. what you can do, start from the source and start walking until you find a blocker…Trees2 min readTrees2 min read

Feb 12, 2021Next Greater numberlet’s try to find the next greater number with the same set of digit 1234 => 1243, 218765 => 251678 here raw solution comes into our mind somehow we need to rearrange digits but how? what biggest and smallest number possible after rearranging digits. very easy to determine when we…Data Structures3 min readData Structures3 min read

Feb 7, 2021Repeating and Missing Number in ArrayGiven an unsorted array of size N of positive integers. One number ‘A’ from set {1, 2, …N} is missing and one number ‘B’ occurs twice in the array. Find these two numbers. Let’s try to solve this problem for this example [1, 2, 4, 4, 5] if nothing is…Data Structures2 min readData Structures2 min read

Aug 22, 2020Find number of squares from N pointsFind number of squares from N points I love mathematics 💗 So,Today morning I decided to solve mathematical problem. Identify all square from given N points. lets first store points in vector const int limit=10000 vector < int > points[limit] assume point is (x,y) points[x].push_back( y) in points vector we…Competitive Programming1 min readCompetitive Programming1 min read

Aug 21, 2020Find number of nodes in the complete binary treeA Binary Tree is a Complete Binary Tree if all the levels are completely filled except possibly the last level and the last level has all keys as left as possible my first approach was to explore the tree using any tree traversal algorithm but time complexity is O(n). I…Binary Search3 min readBinary Search3 min read