Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8334241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:16:55+00:00 2026-06-09T03:16:55+00:00

I want to implement this algorithm in perl 11000, 67676, -7878, 9898 11001, 67676,

  • 0

I want to implement this algorithm in perl

11000,  67676,  -7878,  9898
11001,  67676,  -7878,  7673
11789,  56565,  -0909,  5555
17654,  67676,  -7654,  3214
18776,  99999,  -55,    4444
17765,  67676,  7878,   9898

scan *nodes
hash1{node}=x,y,z
invert_y=y*-1
chech invert_y existance in hash2
if exists
hash2{y}=[n1,n2,n3...].append the node
else
hash2{y}=store node in a array and pass its reference as value 


foreach key in hash1
get x1,y1,z1 of this node1 (eg. hash1{key} will return x,y,z of this node1)
invert_y=y*1
if exists hash2{invert_y}
get all node of hash2{keys} in node_array
foreach node2 in node_array
get x2,y2,z2 of this node2 (eg. hash1{node2} will return x,y,z of this node2)
if x1 of node1 == x2 of node2 && z1 of node1 == z2 of node2
    node1 and node2 are symmetric 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:16:56+00:00Added an answer on June 9, 2026 at 3:16 am

    I took some of your pseudo-code and perl-ized it to get you started.

    hash1{node}=x,y,z
      # value in hash is a reference to a 3-element array
      $hash1{$node} = [ $x, $y, $z ];
    
    foreach key in hash1
      foreach my $k (keys %hash1)
    
    get x1,y1,z1 of this node1 (eg. hash1{key} will return x,y,z of this node1)
      $node1 = $hash1{$k};
    
    invert_y=y*1
      I have no idea what you mean here
    
    if exists hash2{invert_y}
      if (exists $hash2{$invert_y}
    
    get all node of hash2{keys} in node_array
      eh?
    
    foreach node2 in node_array
      foreach $node2 (@node_array)
    
    get x2,y2,z2 of this node2 (eg. hash1{node2} will return x,y,z of this node2)
      $node2 = $hash1{$node2};
    
    if x1 of node1 == x2 of node2 && z1 of node1 == z2 of node2
        node1 and node2 are symmetric 
    
      # x is element 0, y is 1 and z is 2
      if ($node1->[0] == $node2->[0] &&
          $node1->[2] == $node2->[2])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this algorithm that I want to implement on VB6. Sub Main() dim
I want to implement my own clustering algorithm using this Virtual Earth javascript API:
I want to implement this quicksort algorithm with some different pivot strategy but there
I want to implement this view But I have one question: The text which
I want to implement this JSF page with pagination and sorting. Unfortunately Netbeans shows
First, I know about Clog , and I do not want to implement this
given this class definition: public class Frame { IFrameStream CapturedFrom; } I want implement
i starter in jqgrid, i want implement inline edit in jqgrid i have this
I want to implement tomb-stoning in my WP7 app and this app is not
This is the feature i want to implement: check a tree node by click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.