Skip to main content

Posts

Showing posts from 2020

Big O Notation - Time and Space complexity

Big O - In simple words, this describes how long an algorithm takes to run and how much space it takes. It expresses how the runtime quickly grows with respect to the input. This is how we compare different algorithms's efficiency. Some quick notes -  - N could be the actual input or the size of the input - We always talk about the worst-case here - We drop constants and less significant terms since as input grow infinitely large constants and less significant terms do not make much difference Space complexity talks about memory or space. This measures, how memory grows as the input size increases.  Usually, when we talk about space complexity, we're talking about  additional space The link I referred - https://www.interviewcake.com/article/java/big-o-notation-time-and-space-complexity Interview tips - Always talk about time and space complexity at the end. This will earn you bonus points! FAANG companies expect this even if they don't ask explicitly.  Some usef...

Coding round interview questions tips

Tips from the google coding interview video https://www.youtube.com/watch?v=XKu_SEDAykw Always ask for clarifications - some tips below Think out loud Talk about all the solutions before you code out Test a few inputs after writing code by tracing it before saying I am done Talk while coding Talk about time and space complexity at the end to get bonus points Read out the problem loud in a way you understood - Do not code out the wrong solution Clarifying questions Clarify the input & output. E.x. This function accepts 2 arrays and returns an integer, Am I right? Sorting - array already sorted, reverse sorted or not sorted? Can there be -ve elements? Can there be only integers or other types? String - other than English? Can it contain special chars, Unicode, upper case and lower case letters? https://medium.com/@mgtei/how-why-to-ask-clarifying-questions-at-a-whiteboard-interview-for-junior-devs-97571fdc629e Key point to succeed in this round is just don't give up on the problem...

Test data generation or Unit testing interview questions

Some useful info about how to do unit testing- Unit testing is done by developers in an early development stage. Uncovering bugs early saves time and cost. An individual unit of the software is tested by isolating it. Tips and examples-  1. The question could be asked as writing unit tests or writing test data for a function 2. Remember to cover positive, input check, boundary, edge and corner cases 3. Unit tests format will look like this -  Test 1: i/p: None, None o/p: None Test 2: i/p: o/p: 4. Python unit test example - Import pytest Class TestAnagram(unittest.TestCase) Def test_input(self): Assert anagram(“cat”, “dog”) == False Def test_valid(self) Assert anagram(“cat”, “tac”) == True Def test_error(self) With pytest.raises(Exception) anagram(None, None) 5. Test data format None, None None, “cat” “Cat”, None Interview questions - Q: find_second_largest_number(array) {} - I did not write the code, function like this was written on the board. Write te...

Test case writing round interview questions

Test scenarios writing or test case writing round questions are listed here. Answers will be in other individual posts.  1. Write test scenarios for a vending machine. Company: Zenefits 2. Write test scenarios for a login page. Company: Zenefits 3. Write test scenarios for the amazon live code portal(livecode.amazon.jobs) which you are using for this interview. Company: Amazon 4. Write test cases for a file upload page. There would be a simple web application that has a box input to accept URL and there would be a button to upload. You can access the server to check the file has been uploaded or not. Backend there would be a database to store the file. Company: Amazon 

Debugging round interview questions

Debugging round interview questions with answers. These are real questions asked in real interviews.  1. When you come in the morning, SLA has increased for the job searching portal (website). It was fine till today morning. How are you going to debug it? There is a matrix that shows service and it’s SLA. What are the steps you are going to take to debug this problem? Answer : If the SLA has gone up suddenly it's definitely a critical issue. I will first report this problem to all stakeholders. I will check listed points to debug the problem - 1. Check what went in the latest release if that is one  2. Check for nodes that are down. If there is an unusual number of nodes that are not reachable then report it to the infrastructure team. 3. Check for database repair which can cause slowness 4. Check its client-side delay or server-side delay to narrow down the issue 5. Check the geolocation of where the website is slow in order to narrow down 6. Check network bandwidth in the da...

Types of Software Testing

Different types of Software Testing: Functional Testing types: Unit Testing: Individual units or components of the software are tested. A unit is the smallest testable part of the software. This is usually not manual and mostly done by developers as they write code. Integration Testing: Testing of all integrated modules of the software to make sure modules once combines works as expected or not. The best example would be FE and BE integration testing. System Testing:  The entire system is tested as per the defined requirements. Black box testing performed by QA. End to End Testing: Same as System testing but mimics more real-world use cases and interactions with network, databases and real users. Most companies combine system testing and end-to-end testing as there is a very thin line between both. Sanity Testing: Sanity testing is performed by the QA team to determine SW which is released is ready to do a full round of testing or not. This is usually quick and covers basic func...

How to write test cases with a sample test case

What is a test case? A Test Case is a set of actions executed to verify a particular feature or functionality of your software application. The Test case has a set test data, precondition, certain expected and actual results developed for a specific test scenario to verify any requirement. Why test cases are important? Test cases ensure good coverage Test cases are reusable Once written, anyone can execute it If there are no other documents, test cases can be used as baseline documents It's easy to trace the history of pass/fail rate of the particular feature Overall, it helps to improve the quality of the product Who will use test cases? Manual testers, automation testers, developers and management What is a good test case? A good test case or a well-written test case should allow any tester to understand and execute the test How to write a good test case? The main idea is to keep test cases simple, precise, reusable, to focus on one goal an...

Test scenarios for a generic Login page

This list contains test scenarios for a generic login page E2E positive test cases Verify that valid user name and valid password works Verify login by providing registered phone number (many test cases has to be repeated) Verify that password is hidden and not visible after typing Verify forgot password functionality Verify 2FA functionality Verify concurrent login (maximum number of allowed login sessions at once) Verify “Remember Me” functionality Verify once you click next, after entering a username, password page is visible Verify once you are on password page, you can edit the username Verify login page has an option to create a new account for the first time users If the account is created in one country and accessed in another country, OTP should be asked (If OTP is supported) If the account is accessed simultaneously in two diff countries - OTP should be asked Verify that OTP is asked when the user tries to log in on different machines Verify for username requirements such as ...