Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. c++

c++

Scheduled Pinned Locked Moved C / C++ / MFC
data-structuresc++design
2 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tuanguyen2000
    wrote on last edited by
    #1

    c ++ who can show me the direction of this article. There is an undirected star graph consisting of nodes labeled 1 to n. A star graph is a graph in which there is a central node and exactly n - 1 edges connecting the central node to every other node. You are given a 2Dedges integer array where each edge edges[i] = [ui, vi] indicates that there is an edge between the nodes ui and vi. Returns the center of the given star graph. Input: edges = 4 1,2 5,1 1,3 1,4 Output: 1

    CPalliniC 1 Reply Last reply
    0
    • T tuanguyen2000

      c ++ who can show me the direction of this article. There is an undirected star graph consisting of nodes labeled 1 to n. A star graph is a graph in which there is a central node and exactly n - 1 edges connecting the central node to every other node. You are given a 2Dedges integer array where each edge edges[i] = [ui, vi] indicates that there is an edge between the nodes ui and vi. Returns the center of the given star graph. Input: edges = 4 1,2 5,1 1,3 1,4 Output: 1

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      And... What's the problem? Count the connections of each node.

      "In testa che avete, Signor di Ceprano?" -- Rigoletto

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups