Skip to content
Code Utility
  • Home
  • Donate
  • About
  • Codes
    • Ada
    • Agency Insight
    • AMPL
    • Android
    • Apple
    • Arduino
    • ASP
    • AWK
    • Bash
    • C
    • C#
    • C++
    • Clojure
    • Codes
    • ColdFusion
    • D
    • Dart
    • Erlang
    • F#
    • Falcon
    • Forth
    • Groovy
    • Haskell
    • INTERCAL
    • iOS
    • JavaScript
    • Kotlin
    • Linux
    • Lua
    • MATLAB
    • Modula-3
    • MySQL
    • Objective-C
    • Perl
    • Python
    • Scala
    • Sh
    • Smalltalk-80
    • Tcl
    • Windows
    • YACC
  • Linux
  • Python
  • Windows
  • Support
  • Web Stories

depth-first-search

Not sure how this code works to get the tree diameter

Solution for Not sure how this code works to get the tree diameter is Given Below: I am not sure …

Read more

Categories Codes Tags depth-first-search, python, recursion, tree

Which is better DFS or BFS? [closed]

Solution for Which is better DFS or BFS? [closed] is Given Below: Closed. This question is opinion-based. It is not …

Read more

Categories Codes Tags breadth-first-search, depth-first-search, graph

Find all paths in a tree that sum to S

Solution for Find all paths in a tree that sum to S is Given Below: Given a binary tree and …

Read more

Categories Codes Tags depth-first-search, python, tree

is there a better way to exit the recursion?

Solution for is there a better way to exit the recursion? is Given Below: I have this function: class Solution: …

Read more

Categories Codes, Python Tags binary-tree, depth-first-search, python, recursion

Convert a tree in 2d array with depth first search

I have a binary tree the following binary tree, which needs to be converted into a 2d array. [[10,5,3,3]] [[10,5,3,-2]] …

Read more

Categories Codes Tags arrays, binary-tree, depth-first-search, java

algorithm to enumerate all possible paths

Anyway, I just wondered if there was a way to do this, or maybe this is NP-complete. I don’t believe …

Read more

Categories Codes Tags algorithm, breadth-first-search, depth-first-search, graph-algorithm, graph-theory

Sum of the minimum elements in all connected components of an undirected graph

In a city, there is n persons and each person has some friends in the city. (if a is friend …

Read more

Categories Codes Tags algorithm, depth-first-search, graph, java

Algorithm Problem: Find the longest elementary cycle in a directed graph

The problem is: given a directed graph, find the longest simple cycle in the graph. I’ve searched the question and …

Read more

Categories Codes Tags algorithm, depth-first-search, graph, np

Find the shortest path to reach a given destination cell in 2D matrix with obstacles

I am working on below interview question and I am confuse on how to use BFS search here. I am …

Read more

Categories Codes Tags algorithm, breadth-first-search, data-structures, depth-first-search, java

to break the tree in even number of nodes

You are given a tree (a simple connected graph with no cycles). Find the maximum number of edges you can …

Read more

Categories Codes Tags algorithm, c#, depth-first-search, graph-theory
Post navigation
Older posts
Page1 Page2 … Page4 Next →

More Answers

  • ruby – Rails db:setup aborted because wrong number of argument – Code Utility
  • javascript – WebStorm Run JS File with Stdin argument – Code Utility
  • Page not found – Code Utility
  • sql – Postgres trigger refreshing a materialized view not working after some time – Code Utility
  • ssl – Where does the dtls domain args in webrtc come from? – Code Utility
  • Azure Storage Account cannot create new or delete directory – Code Utility
  • java – new data source and connection pool are not displayed in the JDBC resources and Connection pool – Code Utility
  • python – How to create a for loop for OneHotEncoder – Code Utility
  • asp.net core – Ocelot – Add Token to Downstream Url – Code Utility
  • Page not found – Code Utility

.net amazon-web-services android android-studio angular arrays azure c# css dart dataframe django docker excel firebase flutter git html ios java javascript jquery json kotlin laravel linux mysql node.js pandas php postgresql python python-3.x r react-native reactjs spring spring-boot sql sql-server string swift typescript vue.js windows

  • About
  • Privacy Policy
  • Terms and Conditions
  • Use of Cookies
  • Contact
  • Web Stories
© 2020 - 2021 Code Utility