Posts

Showing posts from 2022

Understand pattern to solve coding questions

  Instead of learning solutions to LeetCode questions, understand patterns!! If the input array is sorted -binary search -two pointers If asked for all permutations/subsets then -Backtracking If given a tree/Graph then -DFS -BFS If given a linked list then -two pointers If recursion is banned -stack If must solve in-place then -swap corresponding values -store one or more different values in the same pointer If asked for maximum/minimum -subarray/subset/options then -dynamic programming If asked for top/least K items then -Heap If asked for common strings then -map -trie else -map/set for O(1) time & O(n) space -sort input for O(nlogn) time and O(1) SPACE

Understand pattern to solve coding questions

Instead of learning solutions to LeetCode questions, understand patterns!! If the input array is sorted -binary search -two pointers If asked for all permutations/subsets then -Backtracking If given a tree/Graph then -DFS -BFS If given a linked list then -two pointers If recursion is banned -stack If must solve in-place then -swap corresponding values -store one or more different values in the same pointer If asked for maximum/minimum -subarray/subset/options then -dynamic programming If asked for top/least K items then -Heap If asked for common strings then -map -trie else -map/set for O(1) time & O(n) space -sort input for O(nlogn) time and O(1) SPACE

Interview Experience

 I'm glad to share that I have been selected in 6 companies. I want to share my interview experience, It would be helpful for my juniors, if its needs any modifications so please leave a comment on it, and I'll try to update it. Persistent System :  click here for Interview questions Accolite Digital : click here for interview questions Deloitte :  click here of Deloitte interview questions Wipro :   click here for interview questions Intellect Design :  click here for interview questions Statusneo :   click here for interview questions

Statusneo Interview Experience

  Statusneo Interview Experience:  1. Technical Interview :      duration: 35 minutes Introduce yourself Some questions from my introduction such as which type of blogs do you write and why? Show me your blogging website, and basic questions about it. Your work experience in persistent? What's your preferred programming language and why? Rate yourself in C++. What is recursion? explain it with an example. Which built-in function do we use to find the type of an element(data type) in c++? write code to convert multidimensional array to one dimension, firstly I gave a brute force approach then optimized it using recursion.  Write code to check given string of parathesis is valid or not? I implemented it using stack and without stack, then he was satisfied. In which technology do you want to work in the future? Logical question: You have 8 balls, among them 7 balls having the same weight and one ball having a lower weight than the others, How would you identi...

Deloite Internview experience

Image
Here I'm sharing my interview experience at Deloitte. I got this opportunity through  NLA: National level assessment, which was off-campus hiring. Round 1 (Online Assessment): The difficulty level of the Online test was Moderate Duration: 2 hours  Logical Reasoning questions Quantitative aptitude MS PowerPoint, word, excel related MCQs Testing and cloud computing-related MCQs were also there. 2 coding questions (one question was of easy level and another was of moderate level) The level of questions was moderate. Just brush up on your basics to prepare for it. Attempt maximum questions to qualify for the next round because there is a sectional cut-off also in this exam. They keep their cutoff very high so try to attempt all the questions. There is no negative marking. Those who were qualified were shortlisted for the next round. Round 2 (Technical + HR): Duration: 40 Min Tell me something about yourself? What is blogging? where and which type of blogs do you write? He asked t...

Bitwise operator

 &:  if a&1 then last digit of a will always same as in  previous a. a^1= compliment (a),  a^0=a, (diff bit =a) a^a=0, (same bit =0) coversion : Decimal --> n base = keep divide by base  exp : (17)D = ()2 =  ....... n base --> decimal = multiply each digit with the power of base and add them.   exp: 1* 2^3 + 0*2^2 + 0 * 2*1+ 1*2^0=.. Left shift : a<<b = a* (2^b) Right shift :  a>>b = a/(2^b) unique no. in duplicate array : xor all elements find ith bit of a no. n = n & (1<<n-1) set ith bit  = n | (1<<n-1) reset ith bit= !(1<<n-1) Find position of rightmost set bit negative no. in binary= 1st bit (MSB) = if 0 (+ve), id 1(-ve) neg no. by 2's compliment : find compliment of no. ..then add +1 1 byte range = -128 to 127 (total 256 no. can be stored..2^7) because we ignore 1st bit formula of range = -2^(n-1) to 2^(n-1) -1 find uniq no. in odd repeating no. array find nth magic no. find no. of digit in...

Time complexity

 Time complexity is not the time taken by a computer. It is a function that gives a relationship about time will (grows) increase as increase the input. Notation: Big o notation : f(x) < = g(x) little big o nation : f(x) < g(x)  [strictly] big omega notation : f(x) >= g(x) little big omega notation: f(x) > g(x) [strictly] big theta notation: g(x) < f(x) <g(x)        if f(x) = 3x+2, g(x) = n Space complexity :  actual space(input) + auxiliary space (extra space) SC for recursive function= height of the tree (path) because all the same level functions do not come in that stack at the same time.

Intellect Interview Experience

Image
            Intellect global Hiring Challenge Hello, this is jaya and in this post, I'm going to share my interview experience of intellect Design.        Basically, Intellect hires through Hackathon event, which was conducted on the D2C platform. There were multiple rounds : Online Quiz:   This round only asked java(Core+advance) fundamentals and some DSA based questions. There were 30 minutes to solve 25 questions. It was an elimination round, candidates who scored 70% and above were moved further to the next round. Demo Hackathon: It wasn't an elimination round, but it's mandatory to attempt, so we will be comfortable with the coding platform. Hackathon:    Basically, it was a coding challenge for one hour where they were given two coding questions based on DSA, during the contest we can write code only in java language, we couldn't switch the programming language. the first question was easy to moderate level, where ...