A bracket is considered to be any one of the following characters: (, ), {, }, [, or ]. The coding problem is defined in Hacker Rank platform. The problem can expand your Data Structure knowledge, as well as can helps you to crack Interviews. Two brackets are considered to be a matched pair if the an opening bracket (i.e., (, [, or {) occurs to the left of a closing bracket (i.e., ), ], or }) of the exact same type. There are three types of matched pairs of brackets: [], {}, and (). If the set of brackets it encloses are not matched, then a matching pair of brackets is not balanced. For example, {[(])} is not balanced because…
-
-
In this post we will solve the Maximum Element Problem give by Hacker Rank. It will give you insight to solve any Data Structure Problem. You have an empty sequence, and you will be given N queries. Each query is one of these three types: Function Description Complete the getMax function in the editor below. getMax has the following parameters:– string operations[n]: operations as strings Returns– int[]: the answers to each type 3 query Input Format The first line of input contains an integer, n. The next n lines each contain an above mentioned query. Constraints 1 <= n <= 10^51 <= x <= 10^91 <= type <= 3 All queries are…
-
Hello guys, In this article we are going to see how to implement custom appbar with profile details inside it. Taken the reference from the Stack Overflow, where they discussing about the custom App Bar in flutter. So finding the solution for the same. First of all we have to add App Bar inside Scaffold widgets which takes title In Text Widget form as given below. title: Text( 'Dashboard', style: TextStyle( fontSize: 17, color: Colors.white, letterSpacing: 0.53), ), Then we have to give rounded shape to app bar as given below. shape: RoundedRectangleBorder( borderRadius: BorderRadius.vertical( bottom: Radius.circular(30), ), ), Then…
-
Hello guys, In this article we are going to see how to make custom TextField in flutter. The below method will return the custom TextField that have custom design as per our requirement. It sets end icon with specified icon.
-
What is Flutter? Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. You can also embed Flutter! Let’s see the reasons why to use flutter. Fast Development Stateful hot reload allows you to change your code and see it come to life is less than a second without losing the state of the app. Flutter also ships with a rich set of customizable widgets, all built from modem reactive framework. Expressive + Flexible UI Flutter moves to a widget, rendering, animation and gestures into this framework to give you…
-
The gain G of a certain microwave dish antenna can be expressed as a function of angle by the equation where θ is measured in radians from the boresite of the dish, and sinc x=sin x/x. Plot this gain function on a polar plot, with the title “Antenna Gain vs” in boldface.
-
y(x)=ln 1/(1 –x) for any user-specified value of x, where x is a number <1.0 (note that ln is the natural logarithm, the logarithm to the base e). Use an if structure to verify that the value passed to the program is legal. If the value of x is legal, calculate y(x). If not, write a suitable error message and quit.
-
In this article, we are going to build counter app using bloc pattern. First of all create the new project called flutter_counter. Now open pubspec.yaml file and replace with below code. And then install all of our dependencies by clicking on flutter packages get Project Structure The application uses a feature driven directory structure. This type of project structures enables us to scale the project by having self contained feature. This application is only have single feature but another application may have multiple complex features. BlockObserver To observe all state changes in the application we have to create BlocObserver ab…
-
Multiple linear regression is a model that finds the relationship between a dependent variable and two or more independent variables.
-
Linear Regression Implementation using Gradient Descent Method in Python. To predict the house price based on area of the house.