Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
269 views

I have the coordinates of various points in the Cartesian coordinate system (coordinates are integers) and I need to count the number of equilateral and isosceles triangles that I can construct on ...
user avatar
1 vote
2 answers
182 views

I need help on how to do a Flyod's Triangle style but instead of input value in rows, the triangle is based on the input value as a whole. instead of; Enter a number: 9 1 2 3 4 5 6 7 8 9 10 11 12 ...
LittleBeginner's user avatar
0 votes
1 answer
479 views

After checking the documentation on triangles of networkx, I've wondered if there is a more efficient way of generating a triangle free graph than to randomly spawn graphs until a triangle free one ...
a.t.'s user avatar
  • 2,917
1 vote
1 answer
244 views

I want to count specific subshapes of a bigger shape with python. For expample: I draw a Triangle. I draw a diagonal line cutting the triangle in half. Now the program show draw this triangle with the ...
LeeLii100's user avatar
1 vote
0 answers
273 views

i am trying to get into data analytics using Spark with Scala. My question is how do i get the triangles in a graph? And i mean not the Triangle Count that comes with graphx, but the actual nodes that ...
giorg.mitsos's user avatar
0 votes
2 answers
304 views

I have names of people that are friends and I am looking for triangles of friends, if there are any. Example (names next to each other classify as friends, in the first row the first number represents ...
randommikrovalna's user avatar
3 votes
0 answers
443 views

Given an array that contains positive integers. The task is to calculate the number of triplets a, b, c such that they can be the sides of a triangle or max(a, b, c) < a + b + c - max(a, b, c) the ...
anand singh's user avatar
-2 votes
1 answer
72 views

I have a problem with an algorithmic task. There is content of it: "You have ten points on a plane and none three of them are collinear, each pair of different points is connected by line segment,...
Patryk14's user avatar
0 votes
1 answer
375 views

I am solving some questions in Python and I am beginner level. I wonder how I can copy number that I found on internet. When I try to copy triangle shape number like: 75 95 64 17 47 82 18 35 87 10 20 ...
GAThrawn's user avatar
0 votes
1 answer
1k views

I searched in internet for see polygon count on mobile phone but i didn't see. I just want to see polygon count with adding object step by step.Is there way to see this?Do i just have to see it in ...
y3sari's user avatar
  • 13
0 votes
2 answers
1k views

Can someone help me on this error, when I compile my code in C, I get the following error messages: error: too few arguments to function call, at least argument 'format' must be specified how can I ...
Louisdemof's user avatar
3 votes
2 answers
6k views

I want to count the total number of triangles in a graph using networkx python package. I have tried the following: import networkx as nx g = ## some graph t = nx.triangles(g) However, nx.triangles()...
Ahsan Tarique's user avatar
0 votes
3 answers
205 views

I have to write a code that prints a triangle which the length of the last line is the input number. Also the empty spaces have to be filled with dots. It has to look like this. Also, the code has ...
Felix's user avatar
  • 1
0 votes
4 answers
1k views

I have a problem with my homework. 1) I should write the function SSS with inputs a, b and c. I need to output alpha, beta and gamma. 2) I should write the function SWS with inputs a, b, and gamma. ...
KG. Boys's user avatar
-1 votes
2 answers
133 views

could you help me? I am new in programming and in C++ #include <iostream> #include <cmath> #include <math.h> #include <cstdio> using namespace std; double SSS(double a, ...
KG. Boys's user avatar
0 votes
4 answers
1k views

I tested the program out with 88 and it was left with one star to complete the triangle. 87, two stars 86 three stars. This went on for certain numbers. These are the two options for programming ...
Isaac Attuah's user avatar
0 votes
1 answer
513 views

I would like to test Triangle Clustering in my Neo4j graph. Here is a sample: CREATE(a:Person { name: "a" })-[:FRIENDS]->(b:Person {name : "b"}), (a)-[:WORKS_AT]->(p:Business {name : "Mcdonalds"...
Echelon_One's user avatar
0 votes
2 answers
2k views

I'm playing around with making triangles in Javascript and normally I've had to use 2 functions to make one. I recently tried to create one with a single function though, and it worked perfectly. But ...
Sahil Bagga's user avatar
1 vote
4 answers
3k views

I am new to C and I have this program where I am trying to print a triangle based on its height as such: /\ /__\ So if the height is 2, then there are 2 of '/', '\' and '_'. So I have written ...
Amy's user avatar
  • 15
6 votes
2 answers
1k views

Given some points in plane (upto 500 points), no 3 collinear. We have to determine the number of triangles whose vertices are from the given points and that contain exactly N points inside them. How ...
Artur's user avatar
  • 591
-1 votes
8 answers
36k views

I have a simple question although i cannot manage to resolve this problem. Hope you can help. I need to make triangle using for loop and from this 4 exercises I don't know what to do with the third ...
Gevorg Sahabalyan's user avatar
-2 votes
1 answer
719 views

My professor said that I should find a way to find the number of triangles in a graph. I have a problem what graph should I used but my professor suggested that I must first find a way to count the ...
Joy's user avatar
  • 1
4 votes
1 answer
1k views

I have created an igraph with 1000 edges. My goal is to extract all the triangles found in that igraph but to include the label rather than just then number. I also want it to be in a dataframe form ...
Nick Knauer's user avatar
  • 4,253
0 votes
1 answer
140 views

I've VRML file that is 4.2GB big (!) and consists of 10 different shapes. This is cloud of points (no edges or triangles). How can I display such a big object? Everything I've tried just freezes. Is ...
user avatar
3 votes
1 answer
424 views

I am having a hard time doing a school exercise in Java. We are asked to print out this pattern: +++++++++++++++++++++++++++++++++++++++++++++ +++++++ +++++++ +++++++ +++++++ +++++++ +++++ ...
eroruz's user avatar
  • 93
1 vote
1 answer
75 views

Given a strictly increasing sequence of n positive integers A(1) < A(2) < ... < A(n). We need to find the number of triangles with side lengths as 3 distinct elements of this sequence. ...
Artur's user avatar
  • 591
2 votes
2 answers
929 views

I got asked this in an interview and was told that O(n^2) is possible. Anyone has a simple approach for that? Found here a paper telling me that it is as hard as matrix multiplication: http://kam.mff....
Amtrix's user avatar
  • 338
0 votes
2 answers
729 views

The following code is an algorithm to determine the amount of integer triangles, with their biggest side being smaller or equal to MAX, that have an integer median. The Python version works but is too ...
Nicolás Siplis's user avatar
0 votes
2 answers
1k views

I'm taking each element as "sum", "first" and "sec". If (first + sec < sum) I'll make a hashset(tmp) of these 3 and put this hashset into a larger hashset(triangle) containing all tmp hashsets. ...
Punit's user avatar
  • 67
2 votes
3 answers
1k views

I have found a couple of topics related to this very problem, I just want to know why my code returns incorrect data. So we have to find the first triangle number having more than 500 divisors. ...
fishmong3r's user avatar
  • 1,434
0 votes
1 answer
1k views

I've looked at this thread: All possible Pythagorean Triples Looks similar to mine but I can't get mine to work for some reason.. REVISION 1 #include <iostream> #include <cmath> using ...
Petrus K.'s user avatar
  • 840
0 votes
1 answer
1k views

gl_PrimitiveID seems to count the number of primitives rendered. This seems to be available via both fragment and geometry shaders. Would this be an accurate count of rendered triangles in the view ...
Engineer's user avatar
  • 8,948
8 votes
4 answers
17k views

I know there are a quite some answers existing on this question. However, I found none of them really bringing it to the point. Some argue that a cycle is (almost) the same as a strongly connected ...
Shadow's user avatar
  • 1,092
0 votes
3 answers
207 views

I am working with the Trinigy 3d engine, and it reports models to have twice as many triangles during render than it does in the model display (let's say 4000 instead of 2000). If I render the model ...
zaratustra's user avatar
  • 8,868