Why MIT lecture breadth-first search algorithm is so complicated?

I watched a video for BFS from MIT and the algorithm the lecturer presented was really complicated compared to what I came up. My solution seems to work fine and walk through the vertices in the correct order. Am I missing something?

public static void BFS(GraphNode currentNode, GraphNode searchedNode) {     if (currentNode.index == searchedNode.index) {         System.out.println("Found!");         return;     }      if (visited[currentNode.index]) {         return;     }      visited[currentNode.index] = true;      for (GraphNode child : currentNode.children) {         if (!visited[child.index]) {             nodeQueue.add(child);         }     }      if (!nodeQueue.isEmpty()) {         BFS(nodeQueue.poll(), searchedNode);     } } 

One drawback is that it keeps running after finding a node, but that could be fixed easily by clearing the queue when element is found.

Google Search Console: Separate Subdomain Property from Top Level Property

I’m working with a website and there’s a subdomain which I don’t have access to.

In Google Search Console, the “Property” consists of the entire domain, including this subdomain. (It’s all part of 1 Property).

The subdomain is handled by a different part of the company — and it has a bazillion issues which show up in Google Search Console for the domain as a whole.

I’d like to separate these two domains into two different Search Console properties so that the top level site doesn’t “see” the errors from the subdomain. And I’d like the subdomain to be its own property in Search Console.

(Also I’m a little afraid that the poor quality subdomain may be impacting the search performance of the top level domain? I’m not sure about this).

What I’ve done so far:

I used “Add Property” to add the subdomain to Search Console. That part was easy enough.

Now I have a listing for the top level domain and the subdomain.

What I want to do next

Is there a way to tell Search Console to then ‘ignore’ the subdomain from the main, top-level Search Console property?

Effectively this would give me two totally different Search Console properties. One for the top-level (minus the subdomain) and one for the subdomain.

Is this possible?

How can I index and search a set of mathematical formulas? (using MathWebSearch or similar systems) [closed]

I have a bunch of documents and I need to search Mathematical Formulas in those documents. Those formulas must be ranked in a similar way Google ranks web pages.

Through Google I have found the open source system MathWebSearch but there is no good documentation of tht system.

Is there anybody here who already have worked with MathWebSearch and can help me using MathWebSearch?

Errors in importing files from Kontent Machine into GSA Search Engines Ranker.

Hello GSA Team
I discovered the following error. Please check to help me
I have used the Kontent Machine software to create contents for the GSA Search Engines Ranker.
For example, I created 100 files from Kontent Machine with the feature: “NO Spacing” or “Blank Line”

I then imported the above 100 files in the form of “Artice” into the GSA Search Engines Ranker software.

I see the following error: Only the first file produces 1 long and full content, while the remaining 99 files only produce short contents.

I think that GSA cannot import enough content. It only imports the first paragraph, causing the above error.
I will put the image for you to easily identify

I will attach a few files from Kontent Machine for you to check If there are errors you will be able to fix the error
Thank you so much

Google search English version

I have this problem, I have a multilingual php site, I have set English as the default language, the language changes automatically according to the browser settings. if it is French the site will be seen in French. however in the google search results, even if i have the browser in french, the english language appears in the results. how can i solve?

to be clear I don’t want to use subdomains or urls like www.site.com/fr/ I would like to do like facebook


Is There a way to add an Arrow to Google CSE Refinements via the Mobile Search Layout?

EDIT: This has to do with Google CSE on my WordPress site. If this is not the correct forum, I apologize.

I was just wondering if there was a way to add an arrow or something indicating that mobile users can swipe through the refinement labels via Google CSE? I am not sure how most people know to swipe through them so it could be overlooked.

Thanks and regards,


Delta Search staying in system even after clean install

The picture is of a Dell KB522 multimedia keyboard. I have just made a clean installation of my system with windows 10 and installed chrome with ublock. By pressing the “internet” key (the multimedia key above F1), my default browser will open. Now, this is getting tricky.

If my default browser is Edge, it will open edge as many times as I press this internet key.

If my default browser is chrome, it will open chrome one time with a blank tab but as soon as I hit this internet key a second time, chrome will navigate to delta-search dot com.

The drivers for the keyboard are the default keyboard driver from windows. Adware removal tool by TSA will find only the history entry and cache of delta-search after I hit the internet key mutiple times in chrome.

Question is, where does it come from? Is my chrome/google account the problem?

This is already happening for years. I switched my setup several times over the years, even had a complete hardware switch where I went from AMD to Intel but the kind of keyboard is the same.

Dell KB522

Binary Search Complexity

I was reading an article about Binary Search on one of the websites on the internet that someone had linked, can’t find the link anymore, but this really is bothering me, and I think I am missing something.

function binary_search_alternative(Array, k) is     L := 0     R := n − 1     while L < R do         m := floor((L + R) / 2)         if k > A[m] then             L := m + 1         else:             R := m     if A[L] == k then         return L     return unsuccessful 

My thinking is that at each iteration we are taking an array (n-1) and after each iteration we are halving it so floor((n-1)2^i), where floor((n-1)2^i) = 1, this is before the last iteration, and my calculations show that the number of comparisons for this one is log(n-1), but the article said that it was log(n) + 1. Wikipedia has a similar code, and they say the same thing. How is that?

when connecting to someones wifi without using it, can they see search history from the past? Please answer it’s important for my work

We visited a friend who’s working as a programmer, And he told me to connect my phone to his wifi so he could send me a picture, however he didn’t send it and I left my phone connected to his wifi for an hour without using it. He caused me a lot of problems in the past but we forgot about it.

I really suspect what happened and I wanna ask you of he can see my search history, notes, pictures, messages, passwords? Or install a spyware in my phone? Just via wifi even if i didn’t use it to open anything?

Please answer my work depends on this.

What benefit does Amazon get from including search results in product URLs? [closed]

https://www.amazon.com/JOYO-Wireless-Infinite-Sustainer-Handheld/dp/B07WZL5ZDK/ref=mp_s_a_1_6?keywords=heet+ebow&qid=1580579507&sr=8-6 Above is a link to a product. You can see in the URL what I looked up to find it. As an information conscious person, we know that this benefits Amazon enough to have bothered making the decision. What are the possible benefits, if they’re not already known? What are the risks?