Interview Questions

N-th Tribonacci Number

Problem Statement 1137. N-th Tribonacci Number The Tribonacci sequence Tn is defined as follows:  T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. Given n, return the value of Tn. N-th Tribonacci Number JAVA CODE This problem is an extension of FIBONACCI NUMBER problem. Visit Previous Problem#3 Similar Questions

Mary Jane 
Interview Questions

FIBONACCI NUMBER

Leetcode Problem #509 Problem statement The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is, F(0) = 0F(1) = 1F(n) = F(n – 1) + F(n – 2), for n > 1. Given n, calculate F(n). JAVA CODE FIBONACCI NUMBER Recursion solution […]

Mary Jane 
Interview Questions

Power of 2

Leetcode Problem #231 Problem statement Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such that n == 2x. Power of 2 Why (n&(n−1))=0 correct ? How to use Bitwise Operator ? Operator Description Java C++. Python3 Golang Result Explanation & Bitwise AND […]

Mary Jane 
Interview Questions

5 SOLID Principles in Interview Preparation

Preparing for an interview in the field of software engineering, particularly when focusing on system design or object-oriented programming, often involves understanding and applying the SOLID principles. These principles are a set of design guidelines that help make systems more understandable, flexible, and maintainable. Here’s a detailed overview of each SOLID principle and how to […]

Mary Jane