In the last post we learnt about Linear regression with one variable. What if, we have more than one independent variables or features. As we could see, with more independent variables, our model exactly fits the training data.
Linear regression is a linear approach to modeling the relationship between a scalar response (or dependent variable) and one or more independent variables.
Implementing strings as a built-in objects allows Java to provide a full complement of features that makes string handling in Java very convenient. For example, Java provide various methods to modify a string object like methods to compare two strings, search for a substring, or concatenate two strings etc.
You are given an array prices where prices[i] is the price of a given stock on the ith day. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.
Given the roots of two binary trees p and q, write a function to check if they are the same or not.
Two binary trees are considered the same if they are structurally identical, and each identical node has the same value.
Given a binary tree, find its minimum depth.
The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
Note: A leaf is a node with no children.