²é¿´: 830|»Ø¸´: 4
ÊÕÆð×ó²à

Walmart - KaratÃæÊÔ

|Ö»¿´¸É»õ
±¾Â¥£º 👍   100% (1)
 
 
0% (0)   👎
È«¾Ö£º 👍   100% (17)
 
 
0% (0)    👎

2022(4-6ÔÂ) ÂëÅ©ÀàGeneral ˶ʿ ȫְ@Walmart - Other - ¼¼ÊõµçÃæ ÊÓÆµÃæÊÔ  | 😐 Neutral 😐 AveragePass | ÔÚÖ°Ìø²Û

×¢²áһĶÈý·ÖµØÂÛ̳£¬²é¿´¸ü¶à¸É»õ£¡

ÄúÐèÒª µÇ¼ ²Å¿ÉÒÔÏÂÔØ»ò²é¿´¸½¼þ¡£Ã»ÓÐÕʺţ¿×¢²áÕ˺Å

x
Çó´óÃ×Çó´óÃס«¡« ¸Ðл´ó¼ÒÇó´óÃ×£¡£¡
Karat ×ܹ²60·ÖÖÓ£¬È«³Ì¿ªÉãÏñÍ·¡£
1.×ÔÎÒ½éÉÜ

2. 10·ÖÖÓcs֪ʶ¿ìÎÊ¿ì´ð£¬5¸öÁìÓòÑ¡2¸ö»Ø´ð£¬
ÎÒÑ¡ÁË production issueºÍtest£¬»¹ÓÐfront end£¬ÒÔ¼°ÁíÍâÁ½¸ö²»¼ÇµÃÁË¡£¡£


3. 45·ÖÖÓ×öÌ⣬¾Ý˵ÊÇ×öµÃÔ½¶à¶àÔ½ºÃ£¬ÎÒ×öÁË
ÄúºÃ£¡
±¾ÌûÒþ²ØµÄÄÚÈÝÐèÒª»ý·Ö¸ßÓÚ 188 ²Å¿Éä¯ÀÀ
Äúµ±Ç°»ý·ÖΪ 0¡£
ʹÓÃVIP¼´¿Ì½âËøÔĶÁȨÏÞ»ò²é¿´ÆäËû»ñÈ¡»ý·ÖµÄ·½Ê½
Óοͣ¬ÄúºÃ£¡
±¾ÌûÒþ²ØµÄÄÚÈÝÐèÒª»ý·Ö¸ßÓÚ 188 ²Å¿Éä¯ÀÀ
Äúµ±Ç°»ý·ÖΪ 0¡£
VIP¼´¿Ì½âËøÔĶÁȨÏÞ »ò ²é¿´ÆäËû»ñÈ¡»ý·ÖµÄ·½Ê½
¶È¡£
  1. You're developing a system for scheduling advising meetings with students in a Computer Science program. Each meeting should be scheduled when a student has completed 50% of their academic program.

  2. Each course at our university has at most one prerequisite that must be taken first. No two courses share a prerequisite. There is only one path through the program.

  3. Write a function that takes a list of (prerequisite, course) pairs, and returns the name of the course that the student will be taking when they are halfway through their program. (If a track has an even number of courses, and therefore has two "middle" courses, you should return the first one.)

  4. Sample input 1: (arbitrarily ordered)
  5. pairs1 = [
  6.     ["Foundations of Computer Science", "Operating Systems"],
  7.     ["Data Structures", "Algorithms"],
  8.     ["Computer Networks", "Computer Architecture"],
  9.     ["Algorithms", "Foundations of Computer Science"],
  10.     ["Computer Architecture", "Data Structures"],
  11.     ["Software Design", "Computer Networks"]
  12. ]

  13. In this case, the order of the courses in the program is:
  14.     Software Design
  15.     Computer Networks
  16.     Computer Architecture
  17.     Data Structures
  18.     Algorithms
  19.     Foundations of Computer Science
  20.     Operating Systems

  21. Sample output 1:
  22.     "Data Structures"

  23. Sample input 2:
  24. pairs2 = [
  25.     ["Algorithms", "Foundations of Computer Science"],
  26.     ["Data Structures", "Algorithms"],
  27.     ["Foundations of Computer Science", "Logic"],
  28.     ["Logic", "Compilers"],
  29.     ["Compilers", "Distributed Systems"],
  30. ]

  31. Sample output 2:
  32.     "Foundations of Computer Science"

  33. Sample input 3:
  34. pairs3 = [
  35.     ["Data Structures", "Algorithms"],
  36. ]

  37. Sample output 3:
  38.     "Data Structures"

  39. All Test Cases:
  40. halfway_course(pairs1) => "Data Structures"
  41. halfway_course(pairs2) => "Foundations of Computer Science"
  42. halfway_course(pairs3) => "Data Structures"

  43. Complexity analysis variables:

  44. <div>n: number of pairs in the input</div>
¸´ÖÆ´úÂë
Çó´óÃ×Çó´óÃס«¡« ¸Ðл´ó¼Ò!Çó´óÃ×£¡£¡



ÆÀ·Ö

²ÎÓëÈËÊý 3´óÃ× +14 ÊÕÆð ÀíÓÉ
Falldawn + 1 ¸øÄãµã¸öÔÞ£¡
ÇåµÀÉñ¾ý + 12
mad_air + 1 ºÜÓÐÓõÄÐÅÏ¢£¡

²é¿´È«²¿ÆÀ·Ö


ÉÏһƪ£ºÁéÓ¦µêÃæ¼«¼ÑÌåÑé
ÏÂһƪ£º¿ìÀÖÍË»õVO¹Ò¾­
µØÀïµÄÄäÃûÓû§
ÄäÃûÓû§-352  ·¢±íÓÚ 2022-5-29 11:49:08
±¾Â¥£º 👍   0% (0)
 
 
0% (0)   👎
Õâ¸öÌâÄ¿¾ÍÊǰÑÒ»¸ölinkelist build³öÀ´ È»ºóÕÒÖмäµãµÄÒâ˼Âï
±¾Â¥£º 👍   0% (0)
 
 
0% (0)   👎
È«¾Ö£º 👍   100% (17)
 
 
0% (0)    👎
ÄäÃûÕß ·¢±íÓÚ 2022-5-28 20:49
Õâ¸öÌâÄ¿¾ÍÊǰÑÒ»¸ölinkelist build³öÀ´ È»ºóÕÒÖмäµãµÄÒâ˼Âï

àÅàÅÊǵÄÄØ
ɨÂë¹Ø×¢Ò»Ä¶Èý·ÖµØÇóÖ°ÓëÖ°³¡¹«ÖÚºÅ
¸ü¶à¸É»õÄÚÈݵÈÄã·¢ÏÖ
±¾Â¥£º 👍   0% (0)
 
 
0% (0)   👎
È«¾Ö£º 👍   0% (0)
 
 
0% (0)    👎
Â¥Ö÷ÕâÌâÓÐʲôºÃ°ì·¨°ÉÍ·½ÚµãÒ»ÏÂ×ÓÕÒµ½Ã´£¿
±¾Â¥£º 👍   0% (0)
 
 
0% (0)   👎
È«¾Ö£º 👍   99% (151)
 
 
0% (1)    👎
ÐèÒª½¨linked listÂ𣬸оõ°ÑËùÓпÎpair¶¼´æhashmapÒ²¿ÉÒÔ
ÄúÐèÒªµÇ¼ºó²Å¿ÉÒÔ»ØÌû µÇ¼ | ×¢²áÕ˺Å
Òþ˽ÌáÐÑ£º
  • ☑ ½ûÖ¹·¢²¼¹ã¸æ£¬À­Èº£¬Ìù¸öÈËÁªÏµ·½Ê½£ºÕÒÈËÇëÈ¥🔗ͬѧͬÊ·ÉÓÑ£¬À­ÈºÇëÈ¥🔗À­Èº½á°é£¬¹ã¸æÇëÈ¥🔗ÌøÔéÊг¡,ºÍ 🔗×â·¿¹ã¸æ|ÕÒÊÒÓÑ
  • ☑ ÂÛ̳ÄÚÈÝÔÚ·¢Ìû 30 ·ÖÖÓÄÚ¿ÉÒԱ༭£¬¹ýºóÔò²»ÄÜɾÌû¡£Îª·ÀÖ¹±»É§ÈÅÉõÖÁÈËÈ⣬²»Òª¹«¿ªÁô΢ÐŵÈÁªÏµ·½Ê½£¬ÈçÓÐÐèÇóÇëÒÔÂÛ̳˽ÐÅ·½Ê½·¢ËÍ¡£
  • ☑ ¸É»õ°æ¿é¿ÉÃâ·ÑʹÓà 🔗³¬¼¶ÄäÃû£ºÃæ¾­£¨ÃÀ¹úÃæ¾­¡¢ÖйúÃæ¾­¡¢Êý¿ÆÃæ¾­¡¢PMÃæ¾­£©£¬¶¶°ü¸¤£¨ÃÀ¹ú¡¢Öйú£©ºÍ¼ȡ»ã±¨¡¢¶¨Î»Ñ¡Ð£°æ
  • ☑ ²éÔÄȫվ 🔗¸÷ÖÖÄäÃû·½·¨

±¾°æ»ý·Ö¹æÔò

>
¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí