Majority element is one of the most asked questions in Coding Interview and today we are going to see brute force to optimal way for solving this particular problem.
Link of the problem :- Problem
Task: Our aim is to find the element having the frequency count of a particular element is greater than the size of input array if there is any majority element then print the element else print 0.
Brute Force: In brute force, we try to run a loop through elements and for each element we are checking its count using count function and check whether…
Today we are going to learn Five major yet simple PyTorch function we must know while learning Deep learning.
This post is an assignment for the course “Deep Learning with PyTorch: Zero to GANs”
If you want to learn you can go here
This is the first video of that course, if you want to learn Deep learning from basics.
Now let’s move to the functions, in this post we are going to cover :
But before starting we should import the required libraries
In this post there where 3 example first two…
So let’s move to the next part of learning Data Structure in python are we are on stack.
This is the second blog from that series and we are using the stack class from the First blog see here:
If you want you can check it out as it contain the stack class which we are using for now:
# create a class Stack
self.items = 
return self.items == 
if not self.is_empty():
Now just save this class…
Hello everyone, this is the series I has started on a different data structure which primarily tries to find different implementation or example in that particular data structure.
In this blog, our focus is mostly based on how that implement the data structure in python.
So let’s talk about stack and I am going only in this blog as it should be repetitive for the next blog.
What is Golang and how to install it
First thing what is Go so from Wikipedia to you Go, also known as Golang, is a statically typed, compiled programming language designed at Google by Robert Griesemer, Rob Pike, and Ken Thompson. Go is syntactically similar to C, but with memory safety, garbage collection, structural typing, and CSP-style concurrency.
Ohh a lot of wiki...
Just like Facebook, Google also collects our personal data to improve the experience of its services and, of course, to serve ads.
On one hand, Google promises to offer better ways to let users manage the data it collects. But as it turns out, it stores more information than you could ever imagine.
(New) case in point: your online purchases.
Here's all about it.
Google is tracking, logging your purchases.
In a recent report, CNBC highlighted a hard-to-notice 'purchases' tab buried in Google account settings.
The option, accessed from https://myaccount.google.com/purchases , shows a detailed log of things you have purchased…