July 2020 – Brain Mentors Skip to content

Single Number | Arrays | Data Structures and Algorithms

Single Number is a problem statement that is based on arrays from Data Structures and Algorithms. In this problem, we can find the single number that occurs an odd number of times in the given array. The first approach to solve this problem is: Brute Force Algorithm As you can see we have an array with size 5. To find the single number that occurring the odd number of times in this given array. So, we can traverse from left to right side of the array, one by one select each element and compare it with all the remaining elements of the array. If the selected element is equal to any remaining elements of the array, so for this we keep one variable that is count variable which is used to increment it’s value by 1 each time and If the count variable’s value is odd. It means, it is

What is Recursion? | Concepts of Recursion

The process in which a function calls itself is called recursion. Recursion is a method where the solution of a problem depends upon the solutions that are small instances of the same problem.  The diagram shows how recursion works:  Why we need recursion? Any problem can be solved by a recursive method as well as by the iterative method. But whenever we have a problem that is complex to do just by iterative/looping method. Then we are going to divide the problem into a smaller instance of the same problem that means we solve it by the recursive method. Recursion vs Iteration Recursion Iteration Function calls itself. A set of instructions repeatedly executed. For functions For loops Infinite recursion can lead to system crash/stack overflow. Whereas, infinite iteration consumes CPU cycles. The time complexity of recursion can be found by finding the value of the nth recursive call in terms

Flutter vs React Native – What to Choose?

As mobile hardware is progressing, the demand for mobile apps has started increasing. Software developers were looking for a platform that could make mobile apps fast. Today we are going to talk about React-Native and Flutter. Flutter Flutter is an open source UI (SDK) created by Google. The first version of Flutter was known as codename “Sky”. Flutter framework written in C, C++, and Dart Language. Flutter used to develop mobile app, desktop app and web app. flutter initial release was Alpha(v0.0.6)/May 2017 and now currently stable version of Flutter is (v1.17.0)/May 6 2020. Flutter uses single codebase for Android and iOS platforms. Features of Flutter Flutter is for developers that want a faster way to build beautiful apps, or a way to reach more users with a single investment. Flutter is also for designers that want their original design visions delivered consistently, with high fidelity, to all users. In fact, CodePen now supports Flutter. Flutter

Introduction to Natural Language Processing

NLP short for Natural Language Processing is one of the major areas of Data Science. When it comes to text processing or when you send or receive some sort of data in any text format whether it is a mail or a message or anything else then just think about it that how you are going to apply machine learning on it. A lot of applications are using NLP like Apple Siri, Windows Cortona, Amazon Alex, etc. In this blog we are going to cover : Usage of NLP Text Processing Approach Convert Text document to vector form Implementation using Python and NLTK Usage of NLP Let’s understand the use of NLP with the help of a few examples : Gmail (Spam Classification) When you receive a mail on Gmail then how Gmail finds out whether this mail will go to your inbox or the spam box. Sentiment Analysis When

Sign Up and Start Learning