0
\$\begingroup\$

This question already has an answer here:

The following problem is a common interview question, thus dull answers are discouraged. Go short or creative, best if both:

Create the following pattern

###########
##       ##
# #     # #
#  #   #  #
#   # #   #
#    #    #
#   # #   #
#  #   #  #
# #     # #
##       ##
###########

In case you cry "dupe", I see your point but this is a slight variation and I hope it differs enough to be greenlit.

\$\endgroup\$

marked as duplicate by Angs, caird coinheringaahing, Erik the Outgolfer code-golf Apr 5 '18 at 20:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    \$\begingroup\$ Related, Related \$\endgroup\$ – caird coinheringaahing Apr 5 '18 at 19:53
  • 1
    \$\begingroup\$ I'm pretty sure I've seen an identical question but I can't find it now. \$\endgroup\$ – 12Me21 Apr 5 '18 at 20:09
  • 4
    \$\begingroup\$ @mbx When the question is closed as a duplicate the proposal comment is automatically removed. \$\endgroup\$ – Wheat Wizard Apr 5 '18 at 20:23
  • 1
    \$\begingroup\$ @AliISSA The question was closed so no additional answers are allowed. You can answer this open question if you want. \$\endgroup\$ – dylnan Apr 5 '18 at 20:54
  • 2
    \$\begingroup\$ I think I've mentioned it before, it surprises me how often the people who vote for a question to be closed as a duplicate have already answered the question, maybe gained rep for their answer then deny anyone else the chance to compete with them. No personal attack on anyone intended. I have the utmost respect for everyone here. As I said it just surprises me that this is seen as "community friendly". \$\endgroup\$ – ElPedro Apr 5 '18 at 21:21
4
\$\begingroup\$

Charcoal, 9 bytes

P¬↙×⁶#‖O¬

Try it online!

\$\endgroup\$
  • \$\begingroup\$ Never seen Charchoal before - Short Question: The linked possible dupe by Angs contains an 8 byte Charcoal solution which apparently does not work anymore. Any Ideas why? \$\endgroup\$ – mbx Apr 5 '18 at 20:18
  • \$\begingroup\$ @mbx The deverbosifier is buggy. \$\endgroup\$ – Erik the Outgolfer Apr 5 '18 at 20:21
  • \$\begingroup\$ @EriktheOutgolfer :| crap \$\endgroup\$ – ASCII-only Apr 6 '18 at 5:50
2
\$\begingroup\$

Canvas, 14 bytes

6#×:\ω↷11╋11╋┼

Try it here!

uses an older version of Canvas as in the latest one I undid a thing I undid with a logical reason..

\$\endgroup\$
  • \$\begingroup\$ So you wrote your own language for that, nice! \$\endgroup\$ – mbx Apr 5 '18 at 19:59
  • 1
    \$\begingroup\$ @mbx creating golfing languages is fun :p Shorter solutions might appear though \$\endgroup\$ – dzaima Apr 5 '18 at 20:00
  • \$\begingroup\$ @dzaima and one did :P \$\endgroup\$ – ASCII-only May 10 '18 at 1:28
2
\$\begingroup\$

R, 92 bytes

write(c(" ","#")[1+!!`[<-`(`[<-`(diag(11)+diag(11)[11:1,],c(1,11),,1),,c(1,11),1)],1,11,,"")

Try it online!

That is...a lot of 1s.

\$\endgroup\$
  • \$\begingroup\$ Serves me right for coding a closed question. Used a sligthtly different indexing based approach for 86. Just pasting here for reference. ``[<-(matrix(" ",a<-11,a),c(n<-1:a,110+n,n*10+1,n*12-a,a*n-10,a*n),"#") \$\endgroup\$ – Vlo Apr 5 '18 at 22:16
1
\$\begingroup\$

Python 2, 100 bytes

for i in range(11):s=[" "]*11 if 0<i<10 else ["#"]*11;s[0]=s[10]=s[0+i]=s[10-i]="#";print ''.join(s)

Try it online!

Explanation :

for i in range(11):
  s=[" "]*11 if 0<i<10 else ["#"]*11;    #Ternary Expression to set cap lists 
  s[0]=s[10]=s[0+i]=s[10-i]="#";    #Set '#'s in the right spots
  print ''.join(s)    #Convert to string and print
\$\endgroup\$
1
\$\begingroup\$

C (gcc), 129 122 bytes

*s;f(j,k){for(j=puts(s="###########")-2;--j;)printf("#%*c%*c%*c\n",k-(k==5),k-5?35:32,10-k-k,35,k=j>5?10-j:j,35);puts(s);}

Try it online!

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.